Exemplo n.º 1
0
        private bool ApplyOneToManyRelation <TLeft, TRight>(TLeft leftHand, TRight rightHand, OneToManyRelation relation)
        {
            var equal  = true;
            var lefts  = relation.GetChildren(leftHand).ToList();
            var rights = relation.GetChildren(rightHand).ToList();
            var ix     = 0;

            foreach (var leftMany in lefts)
            {
                var rightMany = rights.ElementAt(ix);
                equal = equal && AreMemberWiseEqual(leftMany, rightMany);
                ix++;
            }
            return(equal);
        }