DbRawSqlQuery<TElement>::ForEachAsync Method

Entity Framework 6.0
 

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.

Return to top

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.

Return to top

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.

Return to top
Show: