none
Relations RRS feed

  • Question

  • I am using the following code to obtain information on the relationship of an entity:

            Dim manager = CType(Me, IEntityWithRelationships).RelationshipManager
            Dim relatedEnds = manager.GetAllRelatedEnds

            For Each relend In relatedEnds
                Console.WriteLine("Relationship Name: {0}", relend.RelationshipName)
                Console.WriteLine("Source Role Name: {0}", relend.SourceRoleName)
                Console.WriteLine("Target Role Name: {0}", relend.TargetRoleName)
                Console.WriteLine("---------------------------------------------------")
            Next

    I'd like to know, in every relationship, which is the main entity and which external or dependent.
    Thanks
    Tuesday, April 21, 2015 12:48 AM

Answers

  • Hi Alejandro Cruzado,

    --> I'd like to know, in every relationship, which is the main entity and which external or dependent.

    manager.GetAllRelatedEnds is used to return an enumeration of all the related ends managed by the relationship manager.

    manager is the main entity, and the relatedEnds is dependent. and the relend is the entity in the relatedEnds.

    Best regards,
    Youjun Tang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, April 22, 2015 2:52 AM