SaveChangesInterceptor.SaveChangesFailedAsync Method

Definition

Called when an exception has been thrown in DbContext.SaveChangesAsync.

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

Parameters

eventData
DbContextErrorEventData

Contextual information about the failure.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A Task representing the asynchronous operation.

Implements

Exceptions

Applies to