Share via


DbReferenceEntry<TEntity,TProperty>.LoadAsync Method

Definition

Overloads

LoadAsync()

Asynchronously loads the entity from the database. Note that if the entity already exists in the context, then it will not overwritten with values from the database.

LoadAsync(CancellationToken)

Asynchronously loads the entity from the database. Note that if the entity already exists in the context, then it will not overwritten with values from the database.

LoadAsync()

Asynchronously loads the entity from the database. Note that if the entity already exists in the context, then it will not overwritten with values from the database.

public System.Threading.Tasks.Task LoadAsync ();
member this.LoadAsync : unit -> System.Threading.Tasks.Task
Public Function LoadAsync () As Task

Returns

A task that represents the asynchronous operation.

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.

Applies to

LoadAsync(CancellationToken)

Asynchronously loads the entity from the database. Note that if the entity already exists in the context, then it will not overwritten with values from the database.

public System.Threading.Tasks.Task LoadAsync (System.Threading.CancellationToken cancellationToken);
member this.LoadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parameters

cancellationToken
CancellationToken

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

Returns

A task that represents the asynchronous operation.

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.

Applies to