I have a desktop client application that uses modal windows to set properties for hierarchical objects. Since this is a client application, and access to DbContext is not streaming, I use a long context in the main form, which is passed to the modal children.
These modal windows use the PropertyGrid property to display object properties and also have cancel buttons. If any data is changed and the cancel button is pressed, the changes are reflected in the parent form (where I cannot dispose of the DbContext object ).
Is there a way to undo any changes made if the DbContext.SaveChanges() method was NOT called?
UPDATE: Entity Version 4.4.
Raheel Khan May 08 '13 at 9:27 a.m. 2013-05-08 09:27
source share