Share via


DbReferenceEntry.IsLoaded Property

Definition

Gets or sets a value indicating whether the entity has been loaded from the database.

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

Property Value

true if the entity is loaded or the IsLoaded has been explicitly set to true; otherwise, false.

Remarks

Loading the related entity from the database either using lazy-loading, as part of a query, or explicitly with one of the Load methods will set the IsLoaded flag to true. IsLoaded can be explicitly set to true to prevent the related entity from being lazy-loaded. Note that explict loading using one of the Load methods will load the related entity from the database regardless of whether or not IsLoaded is true. When a related entity is detached the IsLoaded flag is reset to false indicating that the related entity is no longer loaded.

Applies to