Class DataReaderDisposingEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
DiagnosticSource event payload for DataReaderDisposing.
public class DataReaderDisposingEventData : DataReaderEventData
- Inheritance
-
DataReaderDisposingEventData
- Inherited Members
Remarks
See Logging, events, and diagnostics for more information and examples.
Constructors
DataReaderDisposingEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbCommand, DbDataReader, DbContext?, Guid, Guid, int, int, DateTimeOffset, TimeSpan)
Constructs a DiagnosticSource event payload for DataReaderDisposing.
public DataReaderDisposingEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbCommand command, DbDataReader dataReader, DbContext? context, Guid commandId, Guid connectionId, int recordsAffected, int readCount, DateTimeOffset startTime, TimeSpan duration)
Parameters
eventDefinitionEventDefinitionBaseThe event definition.
messageGeneratorFunc<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
commandDbCommandThe DbCommand that created the reader.
dataReaderDbDataReaderThe DbDataReader that is being disposed.
contextDbContextThe Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.
commandIdGuidA correlation ID that identifies the DbCommand instance being used.
connectionIdGuidA correlation ID that identifies the DbConnection instance being used.
recordsAffectedintGets the number of rows changed, inserted, or deleted by execution of the SQL statement.
readCountintGets the number of read operations performed by this reader.
startTimeDateTimeOffsetThe time when the data reader was created.
durationTimeSpanThe duration from the time the data reader is created until it is disposed. This corresponds to the time reading for reading results of a query.
Properties
Duration
The duration from the time the data reader is created until it is disposed. This corresponds to the time reading for reading results of a query.
public virtual TimeSpan Duration { get; }