Table of Contents

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 EventDefinitionBase

The event definition.

messageGenerator Func<EventDefinitionBase, EventData, string>

A delegate that generates a log message for this event.

context DbContext

The current Microsoft.EntityFrameworkCore.DbContext.

connection DbConnection

The DbConnection being used.

command DbCommand

The DbCommand being used.

dataReader DbDataReader

The DbDataReader being used.

commandId Guid

A correlation ID that identifies the DbCommand instance being used.

connectionId Guid

A correlation ID that identifies the DbConnection instance being used.

entries IReadOnlyList<IUpdateEntry>

The entries that were involved in the concurrency violation.

exception DbUpdateConcurrencyException

The exception that will be thrown, unless throwing is suppressed.

Properties

Command

The DbCommand being used.

public virtual DbCommand Command { get; }

Property Value

DbCommand

CommandId

A correlation ID that identifies the DbCommand instance being used.

public virtual Guid CommandId { get; }

Property Value

Guid

Connection

The DbConnection being used.

public virtual DbConnection Connection { get; }

Property Value

DbConnection

ConnectionId

A correlation ID that identifies the DbConnection instance being used.

public virtual Guid ConnectionId { get; }

Property Value

Guid

DataReader

The DbDataReader being used.

public virtual DbDataReader DataReader { get; }

Property Value

DbDataReader