How do I detect field changes in EF?
I开发者_开发技巧n EF4, I want to know if some fields has been changed. How can I do that?
var propertyFooIsModified =
Context.ObjectStateManager.GetObjectStateEntry(someEntity)
.GetModifiedProperties.Any(p => p == "Foo");
精彩评论