标签: entity-framework
在EF4中,我想知道某些字段是否已更改。我怎么能这样做?
答案 0 :(得分:6)
var propertyFooIsModified = Context.ObjectStateManager.GetObjectStateEntry(someEntity) .GetModifiedProperties.Any(p => p == "Foo");