Jul 29, 2012 at 8:19 PM
Edited Jul 29, 2012 at 8:28 PM
My model classes are POCO's who inherit from DataObjectBase and are read using EF.
The IsDirty on the Model is always true.
When using the ObjectStateManager the state of the modified entity is always unchanged although changes have been made to the properties of the model.
So nothing seems to work :(
Update: Found out why ObjectStateManager does not return the entity as modified: the state is only updated after DetectChanges is called. And this is not called before the SaveChanges on the DbContext.
If I manually call DetectChanges, it works and the entity state is Modified. However, to call DetectChanges for every time I need to check if a model is dirty, is perhaps a bit expensive?