Share via


CoreLoggerExtensions.SaveChangesFailedAsync Method

Definition

Logs for the SaveChangesFailed event.

public static System.Threading.Tasks.Task SaveChangesFailedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> diagnostics, Microsoft.EntityFrameworkCore.DbContext context, Exception exception, System.Threading.CancellationToken cancellationToken = default);
static member SaveChangesFailedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> * Microsoft.EntityFrameworkCore.DbContext * Exception * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SaveChangesFailedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Update), context As DbContext, exception As Exception, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Update>

The diagnostics logger to use.

context
DbContext

The context in use.

exception
Exception

The exception that caused this event.

cancellationToken
CancellationToken

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

Returns

A Task for the async result.

Exceptions

Applies to