Szerkesztés

Megosztás a következőn keresztül:


AssociationAttribute.DeleteRule Property

Definition

Gets or sets delete behavior for an association.

public:
 property System::String ^ DeleteRule { System::String ^ get(); void set(System::String ^ value); };
public string DeleteRule { get; set; }
member this.DeleteRule : string with get, set
Public Property DeleteRule As String

Property Value

A string representing the rule.

Examples

[Association(Name="FK_Products_Categories", Storage="_Products", OtherKey="CategoryID", DeleteRule="NO ACTION")]
public EntitySet<Product> Products
{
    get
    {
        return this._Products;
    }
    set
    {
        this._Products.Assign(value);
    }
}
<Association(Name:="FK_Products_Categories", Storage:="_Products", OtherKey:="CategoryID", DeleteRule:="NO ACTION")>  _
Public Property Products() As EntitySet(Of Product)
    Get
        Return Me._Products
    End Get
    Set
        Me._Products.Assign(value)
    End Set
End Property

Remarks

If set to null, no delete behavior is added. For example, "CASCADE" would add "ON DELETE CASCADE" to the foreign-key relationship.

In the following example, the rule is to take no action.

Applies to