Lazy Loading

Since version 2.1, Entity Framework Core supports lazy loading for associations. Lazy loading can be enabled globally for the entire model or for separate navigation properties of the model.

To enable lazy loading for all the navigation properties in the model, set the Use Lazy-Loading Proxies property of the model to True, either in Properties window or in the Model Settings dialog box. This setting will use the Microsoft.EntityFrameworkCore.Proxies package and add a call to UseLazyLoadingProxies method in order to enable lazy loading for entire model.

To enable Lazy Loading for a separate association end, set the Lazy property for the corresponding navigation property to True.

You can find more information about lazy loading in Entity Framework Core in the Entity Framework Core documentation.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.