Is there a way I can update or insert entities with their DateCreated and UpdateDate fields set to some date when the entity is being saved.
I have a Data Provider helper class that encapsulated update, add and delete functions for all my data objects. However when the object is being saved, DateCreated and UpdateDate fields are null and I'm not assigning them the current date. I wanna be able to save my objects with those dates assigned. I wanna avoid changing the code everywhere where the save action is performed. Is it possible to do it in the DBContext class?