CoreLoggerExtensions.OptimisticConcurrencyExceptionAsync Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Sobrecargas
OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception, CancellationToken)
- Origem:
- CoreLoggerExtensions.cs
- Origem:
- CoreLoggerExtensions.cs
Logs do OptimisticConcurrencyException evento.
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
Parâmetros
- diagnostics
- IDiagnosticsLogger<DbLoggerCategory.Update>
O agente diagnóstico a ser usado.
- context
- DbContext
O contexto em uso.
- exception
- Exception
A exceção que causou esse evento.
- cancellationToken
- CancellationToken
Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.
Retornos
Um Task para o resultado assíncrono.
Exceções
Se o padrão CancellationToken for cancelado.
Aplica-se a
OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>, CancellationToken)
- Origem:
- CoreLoggerExtensions.cs
- Origem:
- CoreLoggerExtensions.cs
- Origem:
- CoreLoggerExtensions.cs
Logs do OptimisticConcurrencyException evento.
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)
Parâmetros
- diagnostics
- IDiagnosticsLogger<DbLoggerCategory.Update>
O agente diagnóstico a ser usado.
- context
- DbContext
O contexto em uso.
- entries
- IReadOnlyList<IUpdateEntry>
As entradas envolvidas na violação de simultaneidade.
- exception
- DbUpdateConcurrencyException
A exceção que causou esse evento.
- createEventData
- Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>,EventDefinition<Exception>,ConcurrencyExceptionEventData>
Delegado opcional para substituir a criação de dados de evento.
- cancellationToken
- CancellationToken
Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.
Retornos
Um Task para o resultado assíncrono.
Exceções
Se o padrão CancellationToken for cancelado.
Aplica-se a
Entity Framework