This topic has not yet been rated - Rate this topic

RelatedEnd.IsLoaded Property

Gets a value that indicates whether all related objects have been loaded.

Namespace:  System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)
public bool IsLoaded { get; }

Property Value

Type: System.Boolean
true if the related end contains all the related objects from the database; otherwise, false.

Implements

IRelatedEnd.IsLoaded

Calling the Load method sets the IsLoaded flag to true.

Calling the Clear method on an EntityCollection<TEntity> sets IsLoaded to false.

An EntityCollection<TEntity> or EntityReference<TEntity> may also be loaded if the related end is included in the query path. For more information about span, see Shaping Query Results (Entity Framework).

The Load method on EntityCollection<TEntity> and EntityReference<TEntity> loads related objects from the data source whether or not IsLoaded is true.

When an object is detached, the IsLoaded flag is changed from false to true.

To guarantee that a related end is fully loaded before doing processing, you should check whether IsLoaded is false. If IsLoaded is false, you should call the Load method.

.NET Framework

Supported in: 4.5, 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.