Langue

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 lors de l’attente de la fin de la tâche.

Retours

Un Task représentant l’opération asynchrone.

Implémente

Exceptions

Si la CancellationToken valeur est annulée.

S’applique à