Link to home
Start Free TrialLog in
Avatar of MRS
MRSFlag for United States of America

asked on

Entity Framework Detecting Changes

I am currently using the entity framework as a data layer for an application.  I am still learning the EF so i might have some of the nameing conventions off.

I have a context Person object that i am displaying to the user via a group of bound controls.  When the user closed the form i would like to detect whether any changes have been made to the object.  If there have been, then i will prompt them to save the changes.

I have everything working well, but i can't seem to figure out how to detect if the object has changed.  I see that my Context Object has a .DetectChanges, but that doesn't seem to return what i would expect.

Is there a way to tell whether changes has been made to an object in the EF?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Adam Menkes
Adam Menkes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial