Share via


NavigationEntry.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:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs
Source:
NavigationEntry.cs

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

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

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

LoadAsync(LoadOptions, CancellationToken)

Source:
NavigationEntry.cs
Source:
NavigationEntry.cs

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

public abstract System.Threading.Tasks.Task LoadAsync (Microsoft.EntityFrameworkCore.ChangeTracking.LoadOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member LoadAsync : Microsoft.EntityFrameworkCore.ChangeTracking.LoadOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public MustOverride Function LoadAsync (options As LoadOptions, Optional cancellationToken As CancellationToken = Nothing) As Task

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