During development, you notice that accessing a related entity property causes an additional query to the database. This was not the intended behavior, and you wish to load related data upfront. Which loading strategy should you employ?

  • Lazy Loading
  • Eager Loading
  • Explicit Loading
  • No Loading
To load related data upfront and avoid additional queries, you should employ "Eager Loading." Eager Loading allows you to retrieve related entities in a single query by specifying what related data to include using the Include method in Entity Framework Core.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *