Share via


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" を追加します。

次の例では、ルールは何も実行しません。

適用対象