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
eventDefinition
EventDefinitionBaseThe event definition.
messageGenerator
Func<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
context
DbContextThe current Microsoft.EntityFrameworkCore.DbContext.
connection
DbConnectionThe DbConnection being used.
command
DbCommandThe DbCommand being used.
dataReader
DbDataReaderThe DbDataReader being used.
commandId
GuidA correlation ID that identifies the DbCommand instance being used.
connectionId
GuidA correlation ID that identifies the DbConnection instance being used.
entries
IReadOnlyList<IUpdateEntry>The entries that were involved in the concurrency violation.
exception
DbUpdateConcurrencyExceptionThe 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; }