RelatedEnd.IRelatedEnd.Remove Method (Object)

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Removes an entity from the related end. If owner is attached to a cache, marks relationship for deletion and if the relationship is composition also marks the entity for deletion.

Namespace:  System.Data.Entity.Core.Objects.DataClasses
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Function Remove ( _
    entity As Object _
) As Boolean Implements IRelatedEnd.Remove
'Usage
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.

Parameters

  • entity
    Type: System.Object
    Entity instance to remove from the related end

Return Value

Type: System.Boolean
Returns true if the entity was successfully removed, false if the entity was not part of the RelatedEnd.

Implements

IRelatedEnd.Remove(Object)

See Also

Reference

RelatedEnd Class

Remove Overload

System.Data.Entity.Core.Objects.DataClasses Namespace