Class RelationalConcurrencyExceptionEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
A DiagnosticSource event payload used when a Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException is being thrown from a relational database provider.
public class RelationalConcurrencyExceptionEventData : ConcurrencyExceptionEventData
- Inheritance
-
RelationalConcurrencyExceptionEventData
Remarks
See Logging, events, and diagnostics for more information and examples.
Constructors
RelationalConcurrencyExceptionEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbContext, DbConnection, DbCommand, DbDataReader, Guid, Guid, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException)
Constructs the event payload.
public RelationalConcurrencyExceptionEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbContext context, DbConnection connection, DbCommand command, DbDataReader dataReader, Guid commandId, Guid connectionId, IReadOnlyList<IUpdateEntry> entries, DbUpdateConcurrencyException exception)
Parameters
eventDefinitionEventDefinitionBaseThe event definition.
messageGeneratorFunc<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
contextDbContextThe current Microsoft.EntityFrameworkCore.DbContext.
connectionDbConnectionThe DbConnection being used.
commandDbCommandThe DbCommand being used.
dataReaderDbDataReaderThe DbDataReader being used.
commandIdGuidA correlation ID that identifies the DbCommand instance being used.
connectionIdGuidA correlation ID that identifies the DbConnection instance being used.
entriesIReadOnlyList<IUpdateEntry>The entries that were involved in the concurrency violation.
exceptionDbUpdateConcurrencyExceptionThe exception that will be thrown, unless throwing is suppressed.
Properties
Command
The DbCommand being used.
public virtual DbCommand Command { get; }
Property Value
CommandId
A correlation ID that identifies the DbCommand instance being used.
public virtual Guid CommandId { get; }
Property Value
Connection
The DbConnection being used.
public virtual DbConnection Connection { get; }
Property Value
ConnectionId
A correlation ID that identifies the DbConnection instance being used.
public virtual Guid ConnectionId { get; }
Property Value
DataReader
The DbDataReader being used.
public virtual DbDataReader DataReader { get; }