Table of Contents

Class CascadeDeleteEventData

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

A DiagnosticSource event payload class for events that indicate an entity is being deleted because its parent entity has been deleted.

public class CascadeDeleteEventData : EntityEntryEventData
Inheritance
CascadeDeleteEventData
Inherited Members

Remarks

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

Constructors

CascadeDeleteEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, EntityEntry, EntityEntry, EntityState)

Constructs the event payload.

public CascadeDeleteEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, EntityEntry entityEntry, EntityEntry parentEntry, EntityState state)

Parameters

eventDefinition EventDefinitionBase

The event definition.

messageGenerator Func<EventDefinitionBase, EventData, string>

A delegate that generates a log message for this event.

entityEntry EntityEntry

The entity entry for the entity that is being deleted.

parentEntry EntityEntry

The entity entry for the parent that trigger the cascade.

state EntityState

The state that the child is transitioning to--usually 'Deleted'.

Properties

ParentEntityEntry

The entity entry for the parent that trigger the cascade.

public virtual EntityEntry ParentEntityEntry { get; }

Property Value

EntityEntry

State

The state that the child is transitioning to--usually 'Deleted'.

public virtual EntityState State { get; }

Property Value

EntityState