Share via


DbRawSqlQuery<TElement>.ToArrayAsync Method

Definition

Overloads

ToArrayAsync()

Creates an array from the query by enumerating it asynchronously.

ToArrayAsync(CancellationToken)

Creates an array from the query by enumerating it asynchronously.

ToArrayAsync()

Creates an array from the query by enumerating it asynchronously.

public System.Threading.Tasks.Task<TElement[]> ToArrayAsync ();
member this.ToArrayAsync : unit -> System.Threading.Tasks.Task<'Element[]>
Public Function ToArrayAsync () As Task(Of TElement())

Returns

Task<TElement[]>

A task that represents the asynchronous operation. The task result contains an array that contains elements from the input sequence.

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

ToArrayAsync(CancellationToken)

Creates an array from the query by enumerating it asynchronously.

public System.Threading.Tasks.Task<TElement[]> ToArrayAsync (System.Threading.CancellationToken cancellationToken);
member this.ToArrayAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Element[]>

Parameters

cancellationToken
CancellationToken

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

Returns

Task<TElement[]>

A task that represents the asynchronous operation. The task result contains an array that contains elements from the input sequence.

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