O'Reilly logo

Fluent Entity Framework by Rebecca M. Riordan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Change detection

Most of the time change-tracking works exactly as you’d expect it to, but there are a few wrinkles to the change-tracking mechanism that you should be aware of, just in case you run into a situation in which it doesn’t:

Change-tracking mechanisms

There are two methods of change-tracking used by the Entity Framework: SNAPSHOT TRACKING, which compares the current and original values of properties during SaveChanges() and PROXY TRACKING, which notifies Entity Framework of changes as they occur. The ObjectContext API always uses proxy tracking, which means that changes that you make to an entity are always handled immediately.

When you use the DbContext API, Entity Framework will use snapshot tracking unless your entity classes comply ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required