QueryableExtensions.ToListAsync Method

 

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.


QueryableExtensions.ToListAsync Method (IQueryable)

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

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static Task<List<object>> ToListAsync(
	this 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.


QueryableExtensions.ToListAsync Method (IQueryable, CancellationToken)

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

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static Task<List<object>> ToListAsync(
	this 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.


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

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

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static Task<List<TSource>> ToListAsync<TSource>(
	this 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.


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

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

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static Task<List<TSource>> ToListAsync<TSource>(
	this 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.