CoreLoggerExtensions.OptimisticConcurrencyException 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
OptimisticConcurrencyException(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception)
public static void OptimisticConcurrencyException (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> diagnostics, Microsoft.EntityFrameworkCore.DbContext context, Exception exception);
static member OptimisticConcurrencyException : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> * Microsoft.EntityFrameworkCore.DbContext * Exception -> unit
<Extension()>
Public Sub OptimisticConcurrencyException (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Update), context As DbContext, exception As Exception)
參數
- diagnostics
- IDiagnosticsLogger<DbLoggerCategory.Update>
要使用的診斷記錄器。
- context
- DbContext
使用中的內容。
- exception
- Exception
造成此事件的例外狀況。
適用於
OptimisticConcurrencyException(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>)
public static Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult OptimisticConcurrencyException (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);
static member OptimisticConcurrencyException : 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> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
<Extension()>
Public Function OptimisticConcurrencyException (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)) As InterceptionResult
參數
- diagnostics
- IDiagnosticsLogger<DbLoggerCategory.Update>
要使用的診斷記錄器。
- context
- DbContext
使用中的內容。
- entries
- IReadOnlyList<IUpdateEntry>
與並行違規相關的專案。
- exception
- DbUpdateConcurrencyException
造成此事件的例外狀況。
- createEventData
- Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>,EventDefinition<Exception>,ConcurrencyExceptionEventData>
選擇性委派以覆寫事件資料建立。