Chapter 10. Working with Object Services
Most of the work that you will do in the Entity Framework will involve the objects that are based on the entities in your Entity Data Model (EDM). Object Services is the part of the framework that creates and manages these objects. Although you have worked with Object Services in earlier chapters, you haven’t yet seen the big picture. The API has a lot of tools that you can access directly to take charge of your entity objects.
This chapter is devoted to giving you a better
understanding of the Object Services API: what it’s responsible for, what
it does under the covers, and some of the ways that you can take advantage
of it. In this chapter, you’ll also get a closer look at the
ObjectContext, the most important Object
You will learn about how queries are processed and turned into
objects, how these objects are managed during their life cycle, and how
Object Services is responsible for the way entities are related to each
other. You will see how the
and the new
ObjectSet work and how they
relate to LINQ to Entities queries under the covers. This chapter will
also give you a better understanding of how Object Services manages an
entity’s state, beyond what you learned in Chapter 6.
As you become more familiar with the purpose, features, and implementation of Object Services, you will be better prepared to solve some of the challenges you will face as you move from using the “drag-and-drop” application-building features ...