views:

85

answers:

1

I have an editable grid bound to a Linq to SQL table. I use SubmitChanges to save changes and I need a way to get old values of the changed rows. I tried getting context.GetChangeSet().Updates but the problem is the rows in this collection has new values not the old ones, even before calling SubmitChanges(). How can I do this?

A: 

The L2S cache will contain the old values. Even after you call SubmitChanges(). I found this out the hard way. The cache will contain the old values until you call context.Refresh() to refresh all the rows. So, you can simply re-retrieve the values. L2S will get them from cache, which will be the old values.

Randy

Randy Minder