RelatedEnd.IRelatedEnd.Remove 方法 (Object)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
從相關端上移除實體。 如果擁有者已附加至快取,則將關聯性標記為要刪除,如果關聯性為組合,則也要將實體標記為要刪除。
命名空間: System.Data.Entity.Core.Objects.DataClasses
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Function Remove ( _
entity As Object _
) As Boolean Implements IRelatedEnd.Remove
'用途
Dim instance As RelatedEnd
Dim entity As Object
Dim returnValue As Boolean
returnValue = CType(instance, IRelatedEnd).Remove(entity)
[SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
bool IRelatedEnd.Remove(
Object entity
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
private:
virtual bool Remove(
Object^ entity
) sealed = IRelatedEnd::Remove
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private abstract Remove :
entity:Object -> bool
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private override Remove :
entity:Object -> bool
JScript supports the use of explicit interface implementations, but not the declarations of new ones.
參數
- entity
類型:System.Object
要從相關端移除的實體執行個體
傳回值
類型:System.Boolean
如果成功移除實體,則傳回 true,如果實體不是 RelatedEnd 的一部分,則為 false。