开发者

EF4 does not commit Updates

Sorry to ask such a general question: what can cause EF to insert records but not update ?

I face a strange situation where i change an entity and when i call SaveChanges(), the changes are no开发者_运维技巧t committed in the DB. thanks Jon


Are you keeping the ObjectContext alive for the entire lifetime of your entities? If not, when you re-attach the entities to a new ObjectContext for saving, the changes made may not be reflected and the entities may not be considered dirty.


Do you have a primary key defined?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜