Programming > JavaScript

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:

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

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

Explicit Loading is a technique we query and load the related entities with an explicit call.
Explicit loading works very similar to Lazy Loading, but the loading of the related entities happens only after an explicit call.
The loading only when we invoke the Load method of the related entity's DBEntityEntry object.


[0] Message Index

Go to full version