Table of Contents

Class ReferenceBehavior

Namespace
LfrlAnvil.Sql
Assembly
LfrlAnvil.Sql.Core.dll

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

ReferenceBehavior

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

ReferenceBehavior

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

ReferenceBehavior

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

ReferenceBehavior

Methods

GetBehavior(Values)

Returns ReferenceBehavior instance associated with the underlying value.

[Pure]
public static ReferenceBehavior GetBehavior(ReferenceBehavior.Values value)

Parameters

value ReferenceBehavior.Values

Underlying value.

Returns

ReferenceBehavior

ReferenceBehavior instance associated with the underlying value.