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
EventDefinitionBaseThe event definition.
messageGenerator
Func<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
entityEntry
EntityEntryThe entry for the entity instance on which the property value has changed.
navigation
INavigationThe navigation property.
oldReferencedEntity
objectThe old referenced entity.
newReferencedEntity
objectThe 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
Navigation
The navigation.
public virtual INavigation Navigation { get; }
Property Value
NewReferencedEntity
The new referenced entity.
public virtual object? NewReferencedEntity { get; }
Property Value
OldReferencedEntity
The old referenced entity.
public virtual object? OldReferencedEntity { get; }