O'Reilly logo

Entity Framework 4.0 Recipes: A Problem-Solution Approach by Larry Tenny, Zeeshan Hirani

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

Chapter 5. Loading Entities and Navigation Properties

Entity Framework provides a rich modeling environment representing a conceptual view of the underlying objects and relationships in data storage. The recipes in this chapter show you how to control the loading of instances of related entities in your queries.

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

In Entity Framework, you can control when the loading ...

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