共用方式為


CoreLoggerExtensions.OptimisticConcurrencyExceptionAsync 方法

定義

多載

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

OptimisticConcurrencyException事件的記錄。

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

OptimisticConcurrencyException事件的記錄。

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

來源:
CoreLoggerExtensions.cs
來源:
CoreLoggerExtensions.cs

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

參數

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Update>

要使用的診斷記錄器。

context
DbContext

使用中的內容。

exception
Exception

造成此事件的例外狀況。

cancellationToken
CancellationToken

CancellationToken等候工作完成時要觀察的 。

傳回

Task非同步結果的 。

例外狀況

適用於

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

來源:
CoreLoggerExtensions.cs
來源:
CoreLoggerExtensions.cs
來源:
CoreLoggerExtensions.cs

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)

參數

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Update>

要使用的診斷記錄器。

context
DbContext

使用中的內容。

entries
IReadOnlyList<IUpdateEntry>

與並行違規相關的專案。

exception
DbUpdateConcurrencyException

造成此事件的例外狀況。

cancellationToken
CancellationToken

CancellationToken等候工作完成時要觀察的 。

傳回

Task非同步結果的 。

例外狀況

適用於