DbRawSqlQuery.ToListAsync Method

 

Creates a List<T> from the query by enumerating it asynchronously.

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

NameDescription
System_CAPS_pubmethodToListAsync()

Creates a List<T> from the query by enumerating it asynchronously.

System_CAPS_pubmethodToListAsync(CancellationToken)

Creates a List<T> from the query by enumerating it asynchronously.


DbRawSqlQuery.ToListAsync Method ()

Creates a List<T> from the query by enumerating it asynchronously.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public virtual Task<List<object>> ToListAsync()

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 query.

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.


DbRawSqlQuery.ToListAsync Method (CancellationToken)

Creates a List<T> from the query by enumerating it asynchronously.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public virtual Task<List<object>> ToListAsync(
	CancellationToken cancellationToken
)

Parameters

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 query.

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.