次の方法で共有


IDbCommandInterceptor.CommandFailedAsync メソッド

定義

コマンドの実行が例外で失敗した場合に呼び出されます。

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

パラメーター

command
DbCommand

コマンド。

eventData
CommandErrorEventData

コマンドと実行に関するコンテキスト情報。

cancellationToken
CancellationToken

CancellationTokenタスクの完了を待機している間に観察する 。

戻り値

非同期操作を表す Task

例外

CancellationToken が取り消されている場合。

適用対象