开发者

EF4 Object State is unchange for newly added rows even change a property

I have a issue with updating records within the same context.

Ex scenario is as follows.

I have a Data entry from and add one record from it. Insert is happens withing transaction scope.

I add record from the same form and try to change the values. it dosnt work. When I see the object state it is unchanged even property value is changed.

updates will work correctly after I restart the app开发者_JS百科lication and change the values. After that all changes affecting correctly.

This happens only the records inserted withing the context.

SaveChages() is called without any Parameter.

Any body has idea about this issue ?

DineshNS


Can you try this:

ObjectContext.ApplyCurrentValues("EntitySetName", currentEntity);

Eg: ObjectContext.ApplyCurrentValues("Orders", Order);

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜