DbReferenceEntry.IsLoaded Property
Definition
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 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
Entity Framework