ReferenceEntry.LoadAsync Method

Definition

Overloads

LoadAsync(CancellationToken)

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

LoadAsync(LoadOptions, CancellationToken)

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

LoadAsync(CancellationToken)

Source:
ReferenceEntry.cs
Source:
ReferenceEntry.cs
Source:
ReferenceEntry.cs
Source:
ReferenceEntry.cs
Source:
ReferenceEntry.cs

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

C#
public override System.Threading.Tasks.Task LoadAsync (System.Threading.CancellationToken cancellationToken = default);

Parameters

cancellationToken
CancellationToken

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

Returns

A task that represents the asynchronous save operation.

Exceptions

Remarks

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.

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

Applies to

Entity Framework Core 9.0 i druge verzije
Proizvod Verzije
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0

LoadAsync(LoadOptions, CancellationToken)

Source:
ReferenceEntry.cs
Source:
ReferenceEntry.cs

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

C#
public override System.Threading.Tasks.Task LoadAsync (Microsoft.EntityFrameworkCore.ChangeTracking.LoadOptions options, System.Threading.CancellationToken cancellationToken = default);

Parameters

options
LoadOptions

Options to control the way related entities are loaded.

cancellationToken
CancellationToken

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

Returns

A task that represents the asynchronous save operation.

Exceptions

Remarks

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.

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

Applies to

Entity Framework Core 9.0 i Entity Framework Core 8.0
Proizvod Verzije
Entity Framework Core 8.0, 9.0