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

Entity state

Image

In the last chapter we talked about retrieving entities from memory based on their state (using Local or some very ugly ObjectContext code), and in this chapter I’ve said that when an entity is part of an entity set, the context will maintain metadata indicating whether the entity is added, modified or deleted (or unchanged, of course). Let’s look at how that magic happens. As you’ve probably come to expect, the ObjectContext and DbContext maintain state using a slightly different API:

Image

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