You can find the first attempt here: https://lowendahl.net/showShout.aspx?id=184
The basic idea is to find the DataContext used when fetching a single object from that object later in the application life-cycle.
I've re-written the whole enchilada now to an extension method that extends INotifyPropertyChanging.
The syntax for getting the context is now:
DataContext context = propduct.GetDataContextFromMe();
or
NorthwindDataContext = product.GetDataContextFromMe();
For a typed version.
You can find and download the extension class here: https://lowendahl.net/shoutCode.aspx
|