Indicates which action should be applied to any child relationships when the deletion of a parent entity occurs
The two options are to set the relationship as null which is the default behavior, or to take no action which will
throw an exception when a parent is removed which would leave a child orphaned
Namespace:
Mindscape.LightSpeedAssembly: Mindscape.LightSpeed (in Mindscape.LightSpeed.dll)
Version: 4.0.0.0 (4.0.0.0)
Syntax
C# |
---|
public enum RemovalBehaviorAction |
Visual Basic (Declaration) |
---|
Public Enumeration RemovalBehaviorAction |
Members
Member name | Description | |
---|---|---|
SetNull |
Sets the value of the entity holder to null
| |
NoAction |
Allows no action to be taken on removal, which will cause an exception to be thrown if attempting to remove
the parent entity of a child which has this action applied
| |
NoActionNoCheck |
No action is taken on removal, and no check is performed to verify that the parent can be safely deleted.
This will cause a database error if the entity has dependent children, unless a trigger or foreign key
cascade action is used at the database level. Because LightSpeed cannot synchronise its in-memory deletions
with the cascade effects in the database, you should save and reset the unit of work after removing any entity
with an association with this behavior. This behavior may be applied only to recursive associations.
|