共用方式為


RelationalLoggerExtensions.ConnectionOpened 方法

定義

ConnectionOpened事件的記錄。

public static void ConnectionOpened (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, DateTimeOffset startTime, TimeSpan duration);
static member ConnectionOpened : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * DateTimeOffset * TimeSpan -> unit
<Extension()>
Public Sub ConnectionOpened (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Connection), connection As IRelationalConnection, startTime As DateTimeOffset, duration As TimeSpan)

參數

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Connection>

要使用的診斷記錄器。

connection
IRelationalConnection

連接。

startTime
DateTimeOffset

作業啟動的時間。

duration
TimeSpan

開啟連線之前的時間量。

適用於