Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.
Explicit loading is valid in EF 6 and EF Core both. Even with lazy loading disabled (in EF 6), it is still possible to lazily load related entities, but it must be done with an explicit call. Use the Load() method to load related entities explicitly.

Forum Jump:

Users browsing this thread: 1 Guest(s)