共用方式為


RelationalLoggerExtensions.TransactionStarting 方法

定義

TransactionStarting事件的記錄。

public static Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbTransaction> TransactionStarting (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.IsolationLevel isolationLevel, Guid transactionId, DateTimeOffset startTime);
static member TransactionStarting : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.IsolationLevel * Guid * DateTimeOffset -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbTransaction>
<Extension()>
Public Function TransactionStarting (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Transaction), connection As IRelationalConnection, isolationLevel As IsolationLevel, transactionId As Guid, startTime As DateTimeOffset) As InterceptionResult(Of DbTransaction)

參數

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>

要使用的診斷記錄器。

connection
IRelationalConnection

連接。

isolationLevel
IsolationLevel

交易隔離等級。

transactionId
Guid

與 相關聯的 DbTransaction 相互關聯識別碼。

startTime
DateTimeOffset

作業啟動的時間。

傳回

執行的結果,可能已經由攔截器修改。

適用於