开发者

submit partial changes to datacontext

is there a way to insert an entity without using the SubmitChanges() function of the datacontext? I want to do this because I have other chan开发者_JAVA技巧ges done on my datacontext which I do not want to submit yet, if I call the SubmitChanges function it will submit all changes including the ones I do not want to save yet.


Either use the new DataContext instance as it is a light-weight OR Use the InsertOnSubmit method for those entities you want to add. Than calling the SubmitChanges only update desired entities.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜