RelatedEnd::SourceRoleName Property
.NET Framework (current version)
Gets the role name at the source end of the relationship.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Implements
IRelatedEnd::SourceRoleNameThe role name is specified by the Role attribute of the End element in the association that defines this relationship in the conceptual model. For more information, see Association Element (CSDL).
The example in this topic is based on the AdventureWorks Sales Model, which was generated by the Entity Data Model Wizard.
The following 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.
.NET Framework
Available since 3.5
Available since 3.5
Show: