Check if there are any pending changes to be saved

Palantir picture Palantir · Jun 28, 2010 · Viewed 27k times · Source

Is there a way to find out whether there are unsaved changes in my entity context, in the Entity Framework?

Answer

Thaoden picture Thaoden · Oct 8, 2014

Starting with EF 6, there is context.ChangeTracker.HasChanges().