Reject changes with LINQ

Given the example


DataAdapter.GetTable<>().UpdateRow(_modifiedBook);
try
{
DataAdapter.ApplyChanges();
}
catch
{
DataAdapter.CancelChanges();
}

CancelChanges method “frees” Delta changes, but as far as I can see (differently from the DASQL approach) _modifiedBook is not set at the original state. Am I right?
If no, what’s my wrong assumption? If yes, I saw that in the “table definitions” file there is a BeginUpdate method that could be suitable, but not in a “WPF binding scenario” like mine (I think). Is there a DataAbstract way to achieve that without tons of boilerplate code?

It is more like a WPF area of responsibility, not DA’s.

What I would do is to call .BeginUpdate on data entity before it enters edit mode (or even on each element of
a DABindingList if you use it).

Then define a helper method that will access the m____OldValues field via reflection and will assign property values of this object back to corresponding parent object’s properties. Then call this method when you need to revert changes made to an object.

Maybe I’m wrong but EntityFramework, Devart’s ORM, Devexpress’ ORM etc. use their change tracker to assolve the “reject changes” task (in generated code) even if they’re not part of WPF. Anyway thank you for the workaround, I just thought that DA was capable of doing that out of the box like its “cousins”