ReferenceEntry.LoadAsync(CancellationToken) Method

Definition

Loads the entity or entities referenced by this navigation property, unless IsLoaded is already set to true.

Note that entities that are already being tracked are not overwritten with new data from the database.

Multiple active operations on the same context instance are not supported. Use await to ensure that any asynchronous operations have completed before calling another method on this context.

public override System.Threading.Tasks.Task LoadAsync (System.Threading.CancellationToken cancellationToken = default);
override this.LoadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function LoadAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

Task

A task that represents the asynchronous operation.

Exceptions

Remarks

See Accessing tracked entities in EF Core and Loading related entities for more information.

Applies to