Linq to sql view not updating
As most developers are used to the object-oriented paradigm, accessing data from a relational database requires understanding of relational paradigm.
NET Framework version 3.5 that provides a run-time infrastructure for managing relational data as objects.
I worked out how to get LINQ to send the current datetime when I'm inserting new records (I just set the Auto Generated value = TRUE for the field in my dbml file and then in the database provide a default value for the table GETDATE() and that seems to work)However, that only works because LINQ just passed back NULL and the database server handles the rest. less than ideal, but secondly that doesn't do me any good for updates.
I have a field Last Updated that needs to display the current datetime of the SQL server when the update is performed. I will also need to handle Last Updated By which would be the user name.
Another approach, which in my opinion is more appropriate for an Auditing function, is to either let the database fill that field in with a default value (i.e.There are several other methods that you can utilize as well.The On Validate is great because you can do validation at the object level instead of the client side.I turned off Append Bound Item and it DOES work for updates and inserts now. Oh well, I suppose this is why I put labels next to the controls and tell the users to pick a value.I haven't researched this yet, but I may as well ask: I don't want to ever actually DELETE a record, I just want to mark it as inactive.