开发者

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");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜