RelatedEnd.IsLoaded Propriedade

Definição

Obtém um valor que indica se todos os objetos relacionados foram carregados.Gets a value that indicates whether all related objects have been loaded.

public:
 property bool IsLoaded { bool get(); };
public bool IsLoaded { get; }
member this.IsLoaded : bool
Public ReadOnly Property IsLoaded As Boolean

Valor da propriedade

Boolean

true se a extremidade relacionada contiver todos os objetos relacionados do banco de dados; caso contrário, false .true if the related end contains all the related objects from the database; otherwise, false.

Implementações

Comentários

Chamar o Load método define o IsLoaded sinalizador como true .Calling the Load method sets the IsLoaded flag to true.

Chamar o Clear método em um EntityCollection<TEntity> conjunto IsLoaded para false .Calling the Clear method on an EntityCollection<TEntity> sets IsLoaded to false.

Um EntityCollection<TEntity> ou EntityReference<TEntity> também poderá ser carregado se a extremidade relacionada estiver incluída no caminho de consulta.An EntityCollection<TEntity> or EntityReference<TEntity> may also be loaded if the related end is included in the query path. Para obter mais informações sobre o span, consulte carregando objetos relacionados.For more information about span, see Loading Related Objects.

O Load método em EntityCollection<TEntity> e EntityReference<TEntity> carrega objetos relacionados da fonte de dados, seja ou IsLoaded não true .The Load method on EntityCollection<TEntity> and EntityReference<TEntity> loads related objects from the data source whether or not IsLoaded is true.

Quando um objeto é desanexado, o IsLoaded sinalizador é alterado de false para true .When an object is detached, the IsLoaded flag is changed from false to true.

Para garantir que uma extremidade relacionada seja totalmente carregada antes de fazer o processamento, você deve verificar se IsLoaded é false .To guarantee that a related end is fully loaded before doing processing, you should check whether IsLoaded is false. Se IsLoaded for false , você deve chamar o Load método.If IsLoaded is false, you should call the Load method.

Aplica-se a