Class DataReaderClosingEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
DiagnosticSource event payload for DataReaderClosing.
public class DataReaderClosingEventData : DataReaderEventData
- Inheritance
-
DataReaderClosingEventData
- Inherited Members
Remarks
See Logging, events, and diagnostics for more information and examples.
Constructors
DataReaderClosingEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbCommand, DbDataReader, DbContext?, Guid, Guid, bool, int, int, DateTimeOffset)
Constructs a DiagnosticSource event payload for DataReaderClosing.
public DataReaderClosingEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbCommand command, DbDataReader dataReader, DbContext? context, Guid commandId, Guid connectionId, bool async, int recordsAffected, int readCount, DateTimeOffset startTime)
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.
asyncboolIndicates whether or not the command was executed asynchronously.
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.
Properties
IsAsync
Indicates whether or not the operation is being executed asynchronously.
public virtual bool IsAsync { get; }