Partilhar via


CoreLoggerExtensions.SaveChangesStartingAsync Método

Definição

Logs do SaveChangesStarting evento.

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

Parâmetros

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Update>

O agente diagnóstico a ser usado.

context
DbContext

O contexto que está sendo usado.

cancellationToken
CancellationToken

Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.

Retornos

O resultado, possivelmente interceptado.

Exceções

Se o padrão CancellationToken for cancelado.

Aplica-se a