Partager via


DbCommandInterceptor.CommandFailedAsync Méthode

Définition

Appelé lorsque l’exécution d’une commande a échoué avec une exception.

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
override this.CommandFailedAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function CommandFailedAsync (command As DbCommand, eventData As CommandErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

Paramètres

command
DbCommand

Commande.

eventData
CommandErrorEventData

Informations contextuelles sur la commande et l’exécution.

cancellationToken
CancellationToken

CancellationToken à observer en attendant la fin de la tâche.

Retours

Task représentant l’opération asynchrone.

Implémente

Exceptions

S’applique à