DbRawSqlQuery<TElement>.ForEachAsync Method
Asynchronously enumerates the query results and performs the specified action on each element.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | ForEachAsync(Action<TElement>) | Asynchronously enumerates the query results and performs the specified action on each element. |
![]() | ForEachAsync(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.
Parameters
- action
-
Type:
System.Action<TElement>
The action to be executed.
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.
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.
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.