Lazy Loading vs Eager Loading

前端 未结 8 1297
予麋鹿
予麋鹿 2020-11-27 10:36

Lazy loading in Entity Framework is the default phenomenon that happens for loading and accessing the related entities. However, eager loading is referred to the practice of

8条回答
  •  -上瘾入骨i
    2020-11-27 11:10

    Lazy loading - is good when handling with pagination like on page load list of users appear which contains 10 users and as the user scrolls down the page an api call brings next 10 users.Its good when you don't want to load enitire data at once as it would take more time and would give bad user experience.

    Eager loading - is good as other people suggested when there are not much relations and fetch entire data at once in single call to database

提交回复
热议问题