Condividi tramite


CoreLoggerExtensions.SaveChangesFailedAsync Metodo

Definizione

Registra l'evento SaveChangesFailed .

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

Parametri

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Update>

Logger di diagnostica da usare.

context
DbContext

Contesto in uso.

exception
Exception

Eccezione che ha causato questo evento.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Restituisce

Oggetto Task per il risultato asincrono.

Eccezioni

Si applica a