Using LINQ GetChangeSet() to show user what happened
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.
精彩评论