CHAPTER 5

image

Loading Entities and Navigation Properties

Entity Framework provides a rich modeling environment that enables the developer to work visually with entity classes that map to database tables, views, stored procedures, and relationships. The recipes in this chapter show you how to control the loading of related entities in your query operations.

The default behavior for Entity Framework is to load only the entities directly needed by your application. In general, this is exactly what you want. If Entity Framework aggressively loaded all of the entities related through one or more associations, you would likely end up loading more entities ...

Get Entity Framework 6 Recipes, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.