AssociationAttribute.DeleteRule Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.