Remove Method (Object)
Collapse the table of content
Expand the table of content

IRelatedEnd.Remove Method (Object)

.NET Framework (current version)

Removes an object from the collection of objects at the related end.

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

bool Remove(
	object entity


Type: System.Object

An object to remove from the collection.

Return Value

Type: System.Boolean

true if entity was successfully removed; false if entity was not part of the IRelatedEnd.

Use this method overload for entity classes that do not implement IEntityWithRelationships. Use the Remove method for entity classes that do implement IEntityWithRelationships.

The Remove method removes an object from the related end. The related end must be an EntityCollection<TEntity>.

The RelatedEnd class explicitly implements the Remove method. The EntityCollection<TEntity> class uses this implementation. For more information, see Remove.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft