What is explicit loading?

By default, related objects (child objects) are not loaded automatically with its parent object until they are requested. To do so you have to use the load method on the related entity’s navigation property.
For example:

// Load the products related to a given category
context.Entry(cat).Reference(p => p.Product).Load();

If lazy loading is disabled then it is still possible to lazily load related entities by explicit loading.

Tagged , . Bookmark the permalink.

Leave a Reply