Explain Lazy loading, Eager Loading, and Explicit Loading?

Technology CommunityCategory: Entity FrameworkExplain Lazy loading, Eager Loading, and Explicit Loading?
VietMX Staff asked 3 years ago
  • Lazy Loading: It is a process to delay the loading of related objects until it is required.
  • Eager Loading: It occurs when you query for an object and all of the related objects are also returned. In eager loading, related objects are loaded automatically with its parent object
  • Explicit Loading: Explicitly loading takes place when you have disabled Lazy loading, and you still want to lazy loading. For this, we have to call the load method on the related entities.