Super Web Mart - Discount Coupons & Deals - Discount Promos, Coupon Codes, Discount deals and web site reviews
 

Author Topic: What is explicit loading?  (Read 510 times)

0 Members and 1 Guest are viewing this topic.

Offline officalchinmay

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
    • Aire Bra
What is explicit loading?
« on: March 24, 2017, 05:50:57 AM »
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();

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

Webmaster Forum

What is explicit loading?
« on: March 24, 2017, 05:50:57 AM »

Offline JustinC

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: What is explicit loading?
« Reply #1 on: August 14, 2020, 03:35:54 AM »
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.

Webmaster Forum

Re: What is explicit loading?
« Reply #1 on: August 14, 2020, 03:35:54 AM »