共用方式為


RelationalLoggerExtensions.ConnectionOpening 方法

定義

ConnectionOpening事件的記錄。

public static Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult ConnectionOpening (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, DateTimeOffset startTime);
static member ConnectionOpening : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * DateTimeOffset -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
<Extension()>
Public Function ConnectionOpening (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Connection), connection As IRelationalConnection, startTime As DateTimeOffset) As InterceptionResult

參數

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Connection>

要使用的診斷記錄器。

connection
IRelationalConnection

連接。

startTime
DateTimeOffset

作業啟動的時間。

傳回

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

適用於