語言

IBatchExecutor.ExecuteAsync 方法

定義

在該資料庫連線中執行批次指令。

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)

參數

commandBatches
IEnumerable<ModificationCommandBatch>

要執行的批次。

connection
IRelationalConnection

使用資料庫連線。

cancellationToken
CancellationToken

A CancellationToken 在等待任務完成時觀察。

傳回

代表非同步儲存操作的任務。 任務結果包含受影響的總列數。

例外狀況

適用於