views:

17

answers:

1

In EF4, i want to know if some fields has been change. how can i do that? thansk john

A: 
var propertyFooIsModified = 
    Context.ObjectStateManager.GetObjectStateEntry(someEntity)
                              .GetModifiedProperties.Any(p => p == "Foo");
Craig Stuntz