开发者

Using LINQ GetChangeSet() to show user what happened

开发者 https://www.devze.com 2022-12-28 07:13 出处:网络
Say I have a L2S Update and I would like to display what changed to the user.Where does GetChangeSet() get populated?Immediately after I assign values or after con开发者_开发百科text.SubmitChanges()?

Say I have a L2S Update and I would like to display what changed to the user. Where does GetChangeSet() get populated? Immediately after I assign values or after con开发者_开发百科text.SubmitChanges()?

If the second; I could, theoretically, change the return type to IList and then return return context.GetChangeSet().Updates;?


AFAIK it's before you call submit changes; submit changes uses the GetChangeSet information to determine what SQL to generate etc.

0

精彩评论

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

关注公众号