Class TransactionEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
The DiagnosticSource event payload base class for RelationalEventId transaction events.
public class TransactionEventData : DbContextEventData
- Inheritance
-
TransactionEventData
- Derived
Constructors
TransactionEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbTransaction, DbContext, Guid, Guid, bool, DateTimeOffset)
Constructs the event payload.
public TransactionEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbTransaction transaction, DbContext context, Guid transactionId, Guid connectionId, bool async, DateTimeOffset startTime)
Parameters
eventDefinitionEventDefinitionBaseThe event definition.
messageGeneratorFunc<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
transactionDbTransactionThe DbTransaction.
contextDbContextThe Microsoft.EntityFrameworkCore.DbContext currently in use, or null if not known.
transactionIdGuidA correlation ID that identifies the Entity Framework transaction being used.
connectionIdGuidA correlation ID that identifies the DbConnection instance being used.
asyncboolIndicates whether or not the transaction is being used asynchronously.
startTimeDateTimeOffsetThe start time of this event.
Properties
ConnectionId
A correlation ID that identifies the DbConnection instance being used.
public virtual Guid ConnectionId { get; }
Property Value
IsAsync
Indicates whether or not the transaction is being used asynchronously.
public virtual bool IsAsync { get; }
Property Value
StartTime
The start time of this event.
public virtual DateTimeOffset StartTime { get; }
Property Value
Transaction
The DbTransaction, or null if it has not yet been created.
public virtual DbTransaction Transaction { get; }
Property Value
TransactionId
A correlation ID that identifies the Entity Framework transaction being used.
public virtual Guid TransactionId { get; }