DbRawSqlQuery<TElement>.ForEachAsync Method

 

Asynchronously enumerates the query results and performs the specified action on each element.

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

NameDescription
System_CAPS_pubmethodForEachAsync(Action<TElement>)

Asynchronously enumerates the query results and performs the specified action on each element.

System_CAPS_pubmethodForEachAsync(Action<TElement>, CancellationToken)

Asynchronously enumerates the query results and performs the specified action on each element.


DbRawSqlQuery<TElement>.ForEachAsync Method (Action<TElement>)

Asynchronously enumerates the query results and performs the specified action on each element.

public Task ForEachAsync(
	Action<TElement> action
)

Parameters

action
Type: System.Action<TElement>

The action to be executed.

Return Value

Type: System.Threading.Tasks.Task

A task that represents the asynchronous operation.

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<TElement>.ForEachAsync Method (Action<TElement>, CancellationToken)

Asynchronously enumerates the query results and performs the specified action on each element.

public Task ForEachAsync(
	Action<TElement> action,
	CancellationToken cancellationToken
)

Parameters

action
Type: System.Action<TElement>

The action to be executed.

cancellationToken
Type: System.Threading.CancellationToken

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

Return Value

Type: System.Threading.Tasks.Task

A task that represents the asynchronous operation.

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.