AssociationAttribute.DeleteRule 屬性

定義

為關聯設定或設定刪除行為。

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

屬性值

一條代表規則的繩子。

範例

[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

備註

若設為 null,則不會新增刪除行為。 例如,「CASCADE」會在外鍵關係中加上「ON DELETE CASCADE」。

以下範例的規則是不採取行動。

適用於