Class CommandEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
The DiagnosticSource event payload for RelationalEventId command events.
public class CommandEventData : CommandCorrelatedEventData
- Inheritance
-
CommandEventData
- Derived
- Inherited Members
Constructors
CommandEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, bool, bool, DateTimeOffset)
Constructs the event payload.
public CommandEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbConnection connection, DbCommand command, DbContext context, DbCommandMethod executeMethod, Guid commandId, Guid connectionId, bool async, bool logParameterValues, DateTimeOffset startTime)
Parameters
eventDefinitionEventDefinitionBaseThe event definition.
messageGeneratorFunc<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
connectionDbConnectionThe DbConnection being used.
commandDbCommandThe DbCommand.
contextDbContextThe Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.
executeMethodDbCommandMethodThe DbCommand method.
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.
logParameterValuesboolIndicates whether or not the application allows logging of parameter values.
startTimeDateTimeOffsetThe start time of this event.
Properties
Command
The DbCommand.
public virtual DbCommand Command { get; }
Property Value
LogParameterValues
Indicates whether or not the application allows logging of parameter values.
public virtual bool LogParameterValues { get; }