共用方式為


IDbCommandInterceptor.CommandCanceledAsync 方法

定義

取消命令時呼叫。

public virtual System.Threading.Tasks.Task CommandCanceledAsync (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandEndEventData eventData, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandCanceledAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandEndEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.CommandCanceledAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandEndEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function CommandCanceledAsync (command As DbCommand, eventData As CommandEndEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

參數

command
DbCommand

命令。

eventData
CommandEndEventData

命令和執行的相關內容資訊。

cancellationToken
CancellationToken

CancellationToken等候工作完成時要觀察的 。

傳回

代表非同步作業的 Task

例外狀況

適用於