RelationshipManager::GetAllRelatedEnds Method ()

 

Returns an enumeration of all the related ends managed by the relationship manager.

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

public:
IEnumerable<IRelatedEnd^>^ GetAllRelatedEnds()

Return Value

Type: System.Collections.Generic::IEnumerable<IRelatedEnd^>^

An IEnumerable<T> of objects that implement IRelatedEnd. An empty enumeration is returned when the relationships have not yet been populated.

The GetAllRelatedEnds method returns an enumeration of EntityCollection<TEntity> and EntityReference<TEntity> objects. EntityCollection<TEntity> and EntityReference<TEntity> are concrete types that derive from RelatedEnd. The RelatedEnd abstract class implements the IRelatedEnd interface.

The example in this topic is based on the AdventureWorks Sales Model. The example adds new SalesOrderHeader entities to the Contact entity. Then it gets all related ends from the Contact entity and displays relationship name, source role name, and target role name for each related end,

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show: