You can easily use the PropertyChanges events to set the flag but how do you easily reset it after a save to the ObjectContext?
A:
what about the ObjectContext.SavingChanges event? See also http://www.thedatafarm.com/blog/2008/07/13/OverridingObjectContextSaveChanges.aspx.
Mark Cidade
2008-08-19 15:39:20
+1
A:
The above method calls for using the SavingChanges event which is called before the changes are persisted. If there is an error during the save, you have already cleared your dirty flag. I would think there would be a SavedChanges event exposed as well.
AndyMan
2008-08-19 19:08:07