I am not sure if there is a quick way to solve this problem.
We have LINQ objects / tables that have a Last Update column that needs to be updated at any time when the object has been modified.
We can come up with some "dirty" solutions to solve this issue, but are not sure that we are going on the right route.
Is there a simple way (perhaps in a partial LINQ object, DataContext, etc.) to be able to say: If you are INSERT / UPDATE, always set the Last Updated column in DateTime.Now ?
Update We have operations in this table in thousands of places in our application, and therefore we are trying to find a way for LINQ to do this for us, without having to find every location of this object being updated.
source share