Share via


AsyncEnumerable<TResult>.LoadAsync(CancellationToken) Method

Definition

Asynchronously enumerates the query. When using Entity Framework, this causes the results of the query to be loaded into the associated context. This is equivalent to calling ToList and then throwing away the list (without the overhead of actually creating the list).

public System.Threading.Tasks.Task LoadAsync (System.Threading.CancellationToken cancellationToken = default);
member this.LoadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public 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 operation.

Applies to