Programming > JavaScript

What is explicit loading?

(1/1)

officalchinmay:
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.

JustinC:
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.

Navigation

[0] Message Index

Go to full version