IBatchExecutor.ExecuteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes the commands in the batches against the given database connection.
public System.Threading.Tasks.Task<int> ExecuteAsync (System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Update.ModificationCommandBatch> commandBatches, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteAsync : seq<Microsoft.EntityFrameworkCore.Update.ModificationCommandBatch> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Function ExecuteAsync (commandBatches As IEnumerable(Of ModificationCommandBatch), connection As IRelationalConnection, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
Parameters
- commandBatches
- IEnumerable<ModificationCommandBatch>
The batches to execute.
- connection
- IRelationalConnection
The database connection to use.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Returns
A task that represents the asynchronous save operation. The task result contains the total number of rows affected.
Exceptions
If the CancellationToken is canceled.
Applies to
Entity Framework