How to detect field changes in EF?

In EF4, I want to know if some fields have been changed. How can i do this?

+4
source share
1 answer
var propertyFooIsModified = Context.ObjectStateManager.GetObjectStateEntry(someEntity) .GetModifiedProperties.Any(p => p == "Foo"); 
+6
source

All Articles