Metodo RelatedEnd.IRelatedEnd.Add (Object)
[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]
Aggiunge un'entità all'entità finale correlata. Se il proprietario è collegato a una cache, tutte le entità finali collegate vengono aggiunte alla cache oggetti e le relazioni corrispondenti vengono aggiunte a ObjectStateManager. Anche l'elemento RelatedEnd della relazione viene corretto.
Spazio dei nomi: System.Data.Entity.Core.Objects.DataClasses
Assembly: EntityFramework (in EntityFramework.dll)
Sintassi
'Dichiarazione
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Sub Add ( _
entity As Object _
) Implements IRelatedEnd.Add
'Utilizzo
Dim instance As RelatedEnd
Dim entity As Object
CType(instance, IRelatedEnd).Add(entity)
[SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
void IRelatedEnd.Add(
Object entity
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
private:
virtual void Add(
Object^ entity
) sealed = IRelatedEnd::Add
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private abstract Add :
entity:Object -> unit
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private override Add :
entity:Object -> unit
JScript supports the use of explicit interface implementations, but not the declarations of new ones.
Parametri
- entity
Tipo: System.Object
Istanza di entità da aggiungere all'entità finale correlata