Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

NavigationEntry.IsLoaded Property

Definition

Namespace:
Microsoft.EntityFrameworkCore.ChangeTracking
Assembly:
Microsoft.EntityFrameworkCore.dll
Package:
Microsoft.EntityFrameworkCore v1.1.6
Package:
Microsoft.EntityFrameworkCore v10.0.0
Package:
Microsoft.EntityFrameworkCore v2.0.3
Package:
Microsoft.EntityFrameworkCore v2.1.11
Package:
Microsoft.EntityFrameworkCore v2.2.6
Package:
Microsoft.EntityFrameworkCore v3.0.0
Package:
Microsoft.EntityFrameworkCore v3.1.0
Package:
Microsoft.EntityFrameworkCore v5.0.0
Package:
Microsoft.EntityFrameworkCore v6.0.0
Package:
Microsoft.EntityFrameworkCore v7.0.0
Package:
Microsoft.EntityFrameworkCore v8.0.0
Package:
Microsoft.EntityFrameworkCore v9.0.0
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets or sets a value indicating whether the entity or entities referenced by this navigation property are known to be loaded.

public virtual bool IsLoaded { get; set; }
member this.IsLoaded : bool with get, set
Public Overridable Property IsLoaded As Boolean

Property Value

true if all the related entities are loaded or the IsLoaded has been explicitly set to true.

Remarks

Loading entities from the database using Include<TEntity,TProperty>(IQueryable<TEntity>, Expression<Func<TEntity,TProperty>>) or ThenInclude<TEntity,TPreviousProperty,TProperty>(IIncludableQueryable<TEntity, IEnumerable<TPreviousProperty>>, Expression<Func<TPreviousProperty, TProperty>>) , Load(), or LoadAsync(CancellationToken) will set this flag. Subsequent calls to Load() or LoadAsync(CancellationToken) will then be a no-op.

It is possible for IsLoaded to be false even if all related entities are loaded. This is because, depending on how entities are loaded, it is not always possible to know for sure that all entities in a related collection have been loaded. In such cases, calling Load() or LoadAsync(CancellationToken) will ensure all related entities are loaded and will set this flag to true.

See Accessing tracked entities in EF Core and Loading related entities for more information and examples.

Applies to


Feedback

Was this page helpful?