Hi,
For my project, I have to log all changes made on my objects, through the entity framework. This consists just to register which fields have been edited on which table at which time.
Roughly, put changes in a table with this kind of structure: IDEvent, EventDate, TableName, RowID, FieldName, OldValue, NewValue
If there is multiple changes, several rows will be inserted.
It already works for 90% of my cases, I'm listening the SavingChanges event of the ObjectContext
My only problem: In the case of an add, my primary keys that are generated by SQL(IDENTITY), are not present at this moment(logic) on the SavingChanges event, because it's not already stored in the DB, and the problem is that I really need it(To fill my RowID in my table)
So, do you have an idea how to do this? I didn't found any "ChangesSaved" event. An idea of workaround?
Thank you!