RelationalLoggerExtensions.DataReaderDisposing 方法

定义

DataReaderDisposing事件的日志。

public static Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult DataReaderDisposing (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, System.Data.Common.DbDataReader dataReader, Guid commandId, int recordsAffected, int readCount, DateTimeOffset startTime, TimeSpan duration);
static member DataReaderDisposing : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * System.Data.Common.DbDataReader * Guid * int * int * DateTimeOffset * TimeSpan -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
<Extension()>
Public Function DataReaderDisposing (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, dataReader As DbDataReader, commandId As Guid, recordsAffected As Integer, readCount As Integer, startTime As DateTimeOffset, duration As TimeSpan) As InterceptionResult

参数

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Command>

要使用的诊断记录器。

connection
IRelationalConnection

连接。

command
DbCommand

数据库命令对象。

dataReader
DbDataReader

数据读取器。

commandId
Guid

与给定 DbCommand关联的关联 ID。

recordsAffected
Int32

数据库中受影响的记录数。

readCount
Int32

已读取的记录数。

startTime
DateTimeOffset

开始操作的时间。

duration
TimeSpan

从操作开始开始的已用时间。

返回

执行的结果,该结果可能已被侦听器修改。

适用于