Class ReferenceBehavior
Represents a foreign key behavior.
public sealed class ReferenceBehavior : Enumeration<ReferenceBehavior, ReferenceBehavior.Values>, IEquatable<ReferenceBehavior>, IComparable<ReferenceBehavior>, IComparable
- Inheritance
-
ReferenceBehavior
- Implements
- Inherited Members
Fields
Cascade
Specifies that a foreign key should allow to delete the referenced record, or to change its identity, and should propagate the change to the referencing record.
public static readonly ReferenceBehavior Cascade
Field Value
NoAction
Specifies that a foreign key should do nothing when the referenced record is deleted, or its identity changes.
public static readonly ReferenceBehavior NoAction
Field Value
Restrict
Specifies that a foreign key should not allow to delete the referenced record, or to change its identity.
public static readonly ReferenceBehavior Restrict
Field Value
SetNull
Specifies that a foreign key should allow to delete the referenced record, or to change its identity, and should modify the referencing record by setting referencing columns' values to null.
public static readonly ReferenceBehavior SetNull
Field Value
Methods
GetBehavior(Values)
Returns ReferenceBehavior instance associated with the underlying value
.
[Pure]
public static ReferenceBehavior GetBehavior(ReferenceBehavior.Values value)
Parameters
value
ReferenceBehavior.ValuesUnderlying value.
Returns
- ReferenceBehavior
ReferenceBehavior instance associated with the underlying
value
.