Delen via


NavigationBuilder.EnableLazyLoading(Boolean) Method

Definition

Configures whether this navigation should be enabled for lazy-loading. Note that a property can only be lazy-loaded if a lazy-loading mechanism such as lazy-loading proxies or ILazyLoader injection has been configured.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder EnableLazyLoading (bool lazyLoadingEnabled = true);
abstract member EnableLazyLoading : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder
override this.EnableLazyLoading : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder
Public Overridable Function EnableLazyLoading (Optional lazyLoadingEnabled As Boolean = true) As NavigationBuilder

Parameters

lazyLoadingEnabled
Boolean

A value indicating if the navigation should be enabled for lazy-loading.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

See Lazy loading for more information and examples.

Applies to