共用方式為


DbCommandInterceptor.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

實作

適用於