Share via


AssociationAttribute.DeleteRule Vlastnost

Definice

Získá nebo nastaví chování odstranění pro přidružení.

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

Hodnota vlastnosti

Řetězec představující pravidlo.

Příklady

[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

Poznámky

Pokud je nastavená hodnota null, nepřidá se žádné chování při odstraňování. Například "CASCADE" by přidala "ON DELETE CASCADE" k relaci cizího klíče.

V následujícím příkladu je pravidlem neprovést žádnou akci.

Platí pro