Share via


DataReaderEventData Constructor

Definition

Constructs a DiagnosticSource event payload for DataReaderClosing.

public DataReaderEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbCommand command, System.Data.Common.DbDataReader dataReader, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, int recordsAffected, int readCount, DateTimeOffset startTime);
new Microsoft.EntityFrameworkCore.Diagnostics.DataReaderEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbCommand * System.Data.Common.DbDataReader * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * int * int * DateTimeOffset -> Microsoft.EntityFrameworkCore.Diagnostics.DataReaderEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), command As DbCommand, dataReader As DbDataReader, context As DbContext, commandId As Guid, connectionId As Guid, recordsAffected As Integer, readCount As Integer, startTime As DateTimeOffset)

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 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
Int32

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

readCount
Int32

Gets the number of read operations performed by this reader.

startTime
DateTimeOffset

The start time of this event.

Applies to