共用方式為


RelationalLoggerExtensions.ConnectionClosedAsync 方法

定義

ConnectionClosed事件的記錄。

public static System.Threading.Tasks.Task ConnectionClosedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, DateTimeOffset startTime, TimeSpan duration);
static member ConnectionClosedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * DateTimeOffset * TimeSpan -> System.Threading.Tasks.Task
<Extension()>
Public Function ConnectionClosedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Connection), connection As IRelationalConnection, startTime As DateTimeOffset, duration As TimeSpan) As Task

參數

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Connection>

要使用的診斷記錄器。

connection
IRelationalConnection

連接。

startTime
DateTimeOffset

作業啟動的時間。

duration
TimeSpan

連接關閉之前的時間量。

傳回

Task 表示非同步作業。

適用於