CoreLoggerExtensions.SaveChangesStartingAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Journaux de l’événement SaveChangesStarting .
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))
Paramètres
- diagnostics
- IDiagnosticsLogger<DbLoggerCategory.Update>
Enregistreur d’diagnostics à utiliser.
- context
- DbContext
Contexte utilisé.
- cancellationToken
- CancellationToken
CancellationToken À observer en attendant la fin de la tâche.
Retours
Résultat, éventuellement intercepté.
Exceptions
Si le CancellationToken est annulé.