How to get original Entity from ChangeTracker
Is there a way to get the original Entity itself from the ChangeTracker (rather than just the original values)? If the State is Modified , then I suppose I could do this: // Get the DbEntityEntry from the DbContext.ChangeTracker... // Store the current values var currentValues = entry.CurrentValues.Clone(); // Set to the original values entry.CurrentValues.SetValues(entry.OriginalValues.Clone()); // Now we have the original entity Foo entity = (Foo)entry.Entity; // Do something with it... // Restore the current values entry.CurrentValues.SetValues(currentValues); But this doesn't seem very