AssociationAttribute.DeleteRule Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta il comportamento di eliminazione per un'associazione.
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
Valore della proprietà
Stringa che rappresenta la regola.
Esempio
[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
Commenti
Se è impostato su Null, non viene aggiunto alcun comportamento di eliminazione. Ad esempio, "CASCADE" aggiunge "ON DELETE CASCADE" alla relazione di chiave esterna.
Nell'esempio seguente la regola deve eseguire alcuna azione.