ISaveChangesInterceptor.SaveChangesFailedAsync(DbContextErrorEventData, CancellationToken) Method

Definition

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

public 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
Public Function SaveChangesFailedAsync (eventData As DbContextErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

eventData
DbContextErrorEventData

Contextual information about the failure.

cancellationToken
CancellationToken

The cancellation token.

Returns

Task

A Task representing the asynchronous operation.

Applies to