Lazy Loading vs Eager Loading

前端 未结 8 1331
予麋鹿
予麋鹿 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条回答
  •  悲&欢浪女
    2020-11-27 10:45

    Lazy loading will produce several SQL calls while Eager loading may load data with one "more heavy" call (with joins/subqueries).

    For example, If there is a high ping between your web and sql servers you would go with Eager loading instead of loading related items 1-by-1 with lazy Loading.

提交回复
热议问题