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::ToListAsync Method

Entity Framework 6.0
 

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

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticToListAsync(IQueryable^)

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

System_CAPS_pubmethodSystem_CAPS_staticToListAsync(IQueryable^, CancellationToken)

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

System_CAPS_pubmethodSystem_CAPS_staticToListAsync<TSource>(IQueryable<TSource>^)

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

System_CAPS_pubmethodSystem_CAPS_staticToListAsync<TSource>(IQueryable<TSource>^, CancellationToken)

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

Return to top

QueryableExtensions::ToListAsync Method (IQueryable^)

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

public:
[ExtensionAttribute]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
static Task<List<Object^>^>^ ToListAsync(
	IQueryable^ source
)

Parameters

source
Type: System.Linq::IQueryable^

An IQueryable to create a List<T> from.

Return Value

Type: System.Threading.Tasks::Task<List<Object^>^>^

A task that represents the asynchronous operation. The task result contains a List<T> that contains elements from the input sequence.

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::ToListAsync Method (IQueryable^, CancellationToken)

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

public:
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[ExtensionAttribute]
static Task<List<Object^>^>^ ToListAsync(
	IQueryable^ source,
	CancellationToken cancellationToken
)

Parameters

source
Type: System.Linq::IQueryable^

An IQueryable to create a List<T> from.

cancellationToken
Type: System.Threading::CancellationToken

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

Return Value

Type: System.Threading.Tasks::Task<List<Object^>^>^

A task that represents the asynchronous operation. The task result contains a List<T> that contains elements from the input sequence.

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::ToListAsync<TSource> Method (IQueryable<TSource>^)

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

public:
generic<typename TSource>
[ExtensionAttribute]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
static Task<List<TSource>^>^ ToListAsync(
	IQueryable<TSource>^ source
)

Parameters

source
Type: System.Linq::IQueryable<TSource>^

An IQueryable<T> to create a List<T> from.

Return Value

Type: System.Threading.Tasks::Task<List<TSource>^>^

A task that represents the asynchronous operation. The task result contains a List<T> 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::ToListAsync<TSource> Method (IQueryable<TSource>^, CancellationToken)

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

public:
generic<typename TSource>
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[ExtensionAttribute]
static Task<List<TSource>^>^ ToListAsync(
	IQueryable<TSource>^ source,
	CancellationToken cancellationToken
)

Parameters

source
Type: System.Linq::IQueryable<TSource>^

An IQueryable<T> to create a list from.

cancellationToken
Type: System.Threading::CancellationToken

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

Return Value

Type: System.Threading.Tasks::Task<List<TSource>^>^

A task that represents the asynchronous operation. The task result contains a List<T> 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: