QueryableExtensions.ToArrayAsync Method

 

Creates an array from an IQueryable<T> by enumerating it asynchronously.

Namespace:   System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticToArrayAsync<TSource>(IQueryable<TSource>)

Creates an array from an IQueryable<T> by enumerating it asynchronously.

System_CAPS_pubmethodSystem_CAPS_staticToArrayAsync<TSource>(IQueryable<TSource>, CancellationToken)

Creates an array from an IQueryable<T> by enumerating it asynchronously.


QueryableExtensions.ToArrayAsync<TSource> Method (IQueryable<TSource>)

Creates an array from an IQueryable<T> by enumerating it asynchronously.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static Task<TSource[]> ToArrayAsync<TSource>(
	this IQueryable<TSource> source
)

Parameters

source
Type: System.Linq.IQueryable<TSource>

An IQueryable<T> to create an array from.

Return Value

Type: System.Threading.Tasks.Task<TSource[]>

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

Type Parameters

TSource

The type of the elements of source.

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.


QueryableExtensions.ToArrayAsync<TSource> Method (IQueryable<TSource>, CancellationToken)

Creates an array from an IQueryable<T> by enumerating it asynchronously.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static Task<TSource[]> ToArrayAsync<TSource>(
	this IQueryable<TSource> source,
	CancellationToken cancellationToken
)

Parameters

source
Type: System.Linq.IQueryable<TSource>

An IQueryable<T> to create an array from.

cancellationToken
Type: System.Threading.CancellationToken

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

Return Value

Type: System.Threading.Tasks.Task<TSource[]>

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

Type Parameters

TSource

The type of the elements of source.

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.