Compartilhar via


ISaveChangesInterceptor.SaveChangesFailedAsync Método

Definição

Chamado quando uma exceção foi lançada em DbContext.SaveChangesAsync.

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

Parâmetros

eventData
DbContextErrorEventData

Informações contextuais sobre a falha.

cancellationToken
CancellationToken

Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.

Retornos

Um Task representando a operação assíncrona.

Exceções

Se o padrão CancellationToken for cancelado.

Aplica-se a