Table of Contents

Class DataReaderDisposingEventData

Namespace
Microsoft.EntityFrameworkCore.Diagnostics
Assembly
Microsoft.EntityFrameworkCore.Relational.dll
public class DataReaderDisposingEventData : DbContextEventData
Inheritance
DataReaderDisposingEventData

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

eventDefinition EventDefinitionBase

The event definition.

messageGenerator Func<EventDefinitionBase, EventData, string>

A delegate that generates a log message for this event.

command DbCommand

The DbCommand that created the reader.

dataReader DbDataReader

The DbDataReader that is being disposed.

context DbContext

The Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.

commandId Guid

A correlation ID that identifies the DbCommand instance being used.

connectionId Guid

A correlation ID that identifies the DbConnection instance being used.

recordsAffected int

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

readCount int

Gets the number of read operations performed by this reader.

startTime DateTimeOffset

The start time of this event.

duration TimeSpan

The duration this event.

Properties

Command

The DbCommand that created the reader.

public virtual DbCommand Command { get; }

Property Value

DbCommand

CommandId

A correlation ID that identifies the DbCommand instance being used.

public virtual Guid CommandId { get; }

Property Value

Guid

ConnectionId

A correlation ID that identifies the DbConnection instance being used.

public virtual Guid ConnectionId { get; }

Property Value

Guid

DataReader

The DbDataReader that is being disposed.

public virtual DbDataReader DataReader { get; }

Property Value

DbDataReader

Duration

The duration this event.

public virtual TimeSpan Duration { get; }

Property Value

TimeSpan

ReadCount

Gets the number of read operations performed by this reader.

public virtual int ReadCount { get; }

Property Value

int

RecordsAffected

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

public virtual int RecordsAffected { get; }

Property Value

int

StartTime

The start time of this event.

public virtual DateTimeOffset StartTime { get; }

Property Value

DateTimeOffset