Table of Contents

Class ReferenceChangedEventData

Namespace
Microsoft.EntityFrameworkCore.Diagnostics
Assembly
Microsoft.EntityFrameworkCore.dll

A DiagnosticSource event payload class for events that indicate a changed property value.

public class ReferenceChangedEventData : NavigationEventData, INavigationBaseEventData
Inheritance
ReferenceChangedEventData
Implements
Inherited Members

Remarks

See Logging, events, and diagnostics for more information and examples.

Constructors

ReferenceChangedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, EntityEntry, INavigation, object?, object?)

Constructs the event payload.

public ReferenceChangedEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, EntityEntry entityEntry, INavigation navigation, object? oldReferencedEntity, object? newReferencedEntity)

Parameters

eventDefinition EventDefinitionBase

The event definition.

messageGenerator Func<EventDefinitionBase, EventData, string>

A delegate that generates a log message for this event.

entityEntry EntityEntry

The entry for the entity instance on which the property value has changed.

navigation INavigation

The navigation property.

oldReferencedEntity object

The old referenced entity.

newReferencedEntity object

The new referenced entity.

Properties

EntityEntry

The entry for the entity instance on which the navigation property value has changed.

public virtual EntityEntry EntityEntry { get; }

Property Value

EntityEntry

Navigation

The navigation.

public virtual INavigation Navigation { get; }

Property Value

INavigation

NewReferencedEntity

The new referenced entity.

public virtual object? NewReferencedEntity { get; }

Property Value

object

OldReferencedEntity

The old referenced entity.

public virtual object? OldReferencedEntity { get; }

Property Value

object