Exemple #1
0
        /// <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 (ReferenceEquals(left.EntitySet, right.EntitySet)
                &&
                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>
        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 (ReferenceEquals(left.EntitySet, right.EntitySet)
                &&
                ReferenceEquals(left.ParentElement.Relationship, right.ParentElement.Relationship)
                &&
                left.Name == right.Name)
            {
                return true;
            }

            return false;
        }
Exemple #3
0
 private static bool AreRelationshipEndsEqual(
     EntityContainerRelationshipSetEnd left,
     EntityContainerRelationshipSetEnd right)
 {
     return(object.ReferenceEquals((object)left.EntitySet, (object)right.EntitySet) && object.ReferenceEquals((object)left.ParentElement.Relationship, (object)right.ParentElement.Relationship) && left.Name == right.Name);
 }