Udostępnij za pośrednictwem


IDbCommandInterceptor.CommandFailedAsync Metoda

Definicja

Wywoływana, gdy wykonanie polecenia nie powiodło się z wyjątkiem.

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

Parametry

command
DbCommand

Polecenie.

eventData
CommandErrorEventData

Kontekstowe informacje o poleceniu i wykonaniu.

cancellationToken
CancellationToken

Element CancellationToken do obserwowania podczas oczekiwania na ukończenie zadania.

Zwraca

Reprezentująca Task operację asynchroniczną.

Wyjątki

Jeśli element CancellationToken zostanie anulowany.

Dotyczy