DbCommandInterceptor.CommandFailedAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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.