Condividi tramite


CoreLoggerExtensions.OptimisticConcurrencyExceptionAsync Metodo

Definizione

Overload

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception, CancellationToken)

Registra l'evento OptimisticConcurrencyException .

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>, CancellationToken)

Registra l'evento OptimisticConcurrencyException .

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception, CancellationToken)

Origine:
CoreLoggerExtensions.cs
Origine:
CoreLoggerExtensions.cs

Registra l'evento OptimisticConcurrencyException .

public static System.Threading.Tasks.Task OptimisticConcurrencyExceptionAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> diagnostics, Microsoft.EntityFrameworkCore.DbContext context, Exception exception, System.Threading.CancellationToken cancellationToken = default);
static member OptimisticConcurrencyExceptionAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> * Microsoft.EntityFrameworkCore.DbContext * Exception * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function OptimisticConcurrencyExceptionAsync (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

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>, CancellationToken)

Origine:
CoreLoggerExtensions.cs
Origine:
CoreLoggerExtensions.cs
Origine:
CoreLoggerExtensions.cs

Registra l'evento OptimisticConcurrencyException .

public static System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> OptimisticConcurrencyExceptionAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> diagnostics, Microsoft.EntityFrameworkCore.DbContext context, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Update.IUpdateEntry> entries, Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException exception, Func<Microsoft.EntityFrameworkCore.DbContext,Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException,System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Update.IUpdateEntry>,Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<Exception>,Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData>? createEventData, System.Threading.CancellationToken cancellationToken = default);
static member OptimisticConcurrencyExceptionAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> * Microsoft.EntityFrameworkCore.DbContext * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Update.IUpdateEntry> * Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException * Func<Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Update.IUpdateEntry>, Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition<Exception>, Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
<Extension()>
Public Function OptimisticConcurrencyExceptionAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Update), context As DbContext, entries As IReadOnlyList(Of IUpdateEntry), exception As DbUpdateConcurrencyException, createEventData As Func(Of DbContext, DbUpdateConcurrencyException, IReadOnlyList(Of IUpdateEntry), EventDefinition(Of Exception), ConcurrencyExceptionEventData), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult)

Parametri

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Update>

Logger di diagnostica da usare.

context
DbContext

Contesto in uso.

entries
IReadOnlyList<IUpdateEntry>

Voci coinvolte nella violazione della concorrenza.

exception
DbUpdateConcurrencyException

Eccezione che ha causato questo evento.

createEventData
Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>,EventDefinition<Exception>,ConcurrencyExceptionEventData>

Delegato facoltativo per eseguire l'override della creazione dei dati dell'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