views:

293

answers:

3

Hi,

i just wanted to ask if there is a way the reject all changes made to a ADO.NET Framework model with its relations? Auditing in Entity Framework describes a way the restore the original value of a single entity. But is this possible for all unsaved changes in the whole database?

+1  A: 

In version 1.0 there is no automatic way to do it. Look here how it can be done Julie Lerman Programming Entity Framework.

For the version 4, I really don't know.

Misha N.
A: 

You can dispose of the ObjectContext and make a new one. That does work.

Craig Stuntz
A: 

Non of the methods below worked for me. Solution was to write a function which refreshed the whole entity.

Alexander