Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DbReferenceEntry.IsLoaded Property


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

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

public bool IsLoaded { get; set; }

Property Value

Type: System.Boolean

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

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.

Return to top
© 2015 Microsoft