RelatedEnd.IRelatedEnd.Add 方法 (IEntityWithRelationships)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
將實體加入至相關端。 此方法的運作方式與 Add(object) 完全相同。 保留它的目的在於提供與舊版 IRelatedEnd 的回溯相容性。
命名空間: System.Data.Entity.Core.Objects.DataClasses
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Sub Add ( _
entity As IEntityWithRelationships _
) Implements IRelatedEnd.Add
'用途
Dim instance As RelatedEnd
Dim entity As IEntityWithRelationships
CType(instance, IRelatedEnd).Add(entity)
[SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
void IRelatedEnd.Add(
IEntityWithRelationships entity
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
private:
virtual void Add(
IEntityWithRelationships^ entity
) sealed = IRelatedEnd::Add
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private abstract Add :
entity:IEntityWithRelationships -> unit
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private override Add :
entity:IEntityWithRelationships -> unit
JScript supports the use of explicit interface implementations, but not the declarations of new ones.
參數
- entity
類型:System.Data.Entity.Core.Objects.DataClasses.IEntityWithRelationships
要加入至相關端的實體執行個體
Implements
IRelatedEnd.Add(IEntityWithRelationships)