Enum ReferentialAction
- Namespace
- Microsoft.EntityFrameworkCore.Migrations
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
The action that a database may take when handling a foreign key constraint as part of an update or delete.
public enum ReferentialAction
Fields
Cascade = 2Cascade the action to the constrained rows.
NoAction = 0Do nothing. That is, just ignore the constraint.
Restrict = 1Don't perform the action if it would result in a constraint violation and instead generate an error.
SetDefault = 4Set a default value on the constrained rows so that the constraint is not violated after the action completes.
SetNull = 3Set null on the constrained rows so that the constraint is not violated after the action completes.
Remarks
Note that some database engines do not support or correctly honor every action.