ISaveChangesInterceptor.SaveChangesFailedAsync Method

Definition

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

C#
public System.Threading.Tasks.Task SaveChangesFailedAsync (Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);
C#
public virtual System.Threading.Tasks.Task SaveChangesFailedAsync (Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);

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.

Exceptions

Applies to

Product Versions
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0