CascadeTiming Enum

Definition

Defines different strategies for when cascading actions will be performed. See CascadeDeleteTiming and DeleteOrphansTiming.

C#
public enum CascadeTiming
Inheritance
CascadeTiming

Fields

Name Value Description
Immediate 0

Cascading actions are made to dependent/child entities as soon as the principal/parent entity changes.

OnSaveChanges 1

Cascading actions are made to dependent/child entities as part of SaveChanges().

Never 2

Cascading actions are never made automatically to dependent/child entities, but must instead be triggered by an explicit call.

Remarks

See EF Core cascade deletes and deleting orphans for more information and examples.

Applies to

Product Versions
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0