/// <summary> /// Returns true if the given two ends are similar - the relationship type that this ends belongs to is the same /// and the entity set refered by the ends are same and they have the same role name /// </summary> /// <param name="left"></param> /// <param name="right"></param> /// <returns></returns> private static bool AreRelationshipEndsEqual(EntityContainerRelationshipSetEnd left, EntityContainerRelationshipSetEnd right) { Debug.Assert(left.ParentElement.ParentElement == right.ParentElement.ParentElement, "both end should belong to the same entity container"); if (object.ReferenceEquals(left.EntitySet, right.EntitySet) && object.ReferenceEquals(left.ParentElement.Relationship, right.ParentElement.Relationship) && left.Name == right.Name) { return(true); } return(false); }
/// <summary> /// Returns true if the given two ends are similar - the relationship type that this ends belongs to is the same /// and the entity set refered by the ends are same and they have the same role name /// </summary> /// <param name="left"></param> /// <param name="right"></param> /// <returns></returns> private static bool AreRelationshipEndsEqual(EntityContainerRelationshipSetEnd left, EntityContainerRelationshipSetEnd right) { Debug.Assert(left.ParentElement.ParentElement == right.ParentElement.ParentElement, "both end should belong to the same entity container"); if (object.ReferenceEquals(left.EntitySet, right.EntitySet) && object.ReferenceEquals(left.ParentElement.Relationship, right.ParentElement.Relationship) && left.Name == right.Name) { return true; } return false; }