Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

QueryableExtensions::ToArrayAsync Method

Entity Framework 6.0
 

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.

Return to top

QueryableExtensions::ToArrayAsync<TSource> Method (IQueryable<TSource>^)

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

public:
generic<typename TSource>
[ExtensionAttribute]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
static Task<array<TSource>^>^ ToArrayAsync(
	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<array<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.

Return to top

QueryableExtensions::ToArrayAsync<TSource> Method (IQueryable<TSource>^, CancellationToken)

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

public:
generic<typename TSource>
[ExtensionAttribute]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
static Task<array<TSource>^>^ ToArrayAsync(
	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<array<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.

Return to top
Show: