Share via


RelationalLoggerExtensions.DataReaderDisposing Method

Definition

Logs for the DataReaderDisposing event.

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

Parameters

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Command>

The diagnostics logger to use.

connection
IRelationalConnection

The connection.

command
DbCommand

The database command object.

dataReader
DbDataReader

The data reader.

commandId
Guid

The correlation ID associated with the given DbCommand.

recordsAffected
Int32

The number of records in the database that were affected.

readCount
Int32

The number of records that were read.

startTime
DateTimeOffset

The time that the operation was started.

duration
TimeSpan

The elapsed time from when the operation was started.

Returns

The result of execution, which may have been modified by an interceptor.

Applies to