private DbRelatedEntityRef VisitRelatedEntityRef(DbRelatedEntityRef entityRef)
        {
            RelationshipEndMember newSource;
            RelationshipEndMember newTarget;

            VisitRelationshipEnds(entityRef.SourceEnd, entityRef.TargetEnd, out newSource, out newTarget);
            var newTargetRef = VisitExpression(entityRef.TargetEntityReference);

            if (!ReferenceEquals(entityRef.SourceEnd, newSource)
                ||
                !ReferenceEquals(entityRef.TargetEnd, newTarget)
                ||
                !ReferenceEquals(entityRef.TargetEntityReference, newTargetRef))
            {
                return(CqtBuilder.CreateRelatedEntityRef(newSource, newTarget, newTargetRef));
            }
            else
            {
                return(entityRef);
            }
        }
示例#2
0
 internal virtual void VisitRelatedEntityReference(DbRelatedEntityRef relatedEntityRef)
 {
     VisitExpression(relatedEntityRef.TargetEntityReference);
 }
 internal virtual void VisitRelatedEntityReference(DbRelatedEntityRef relatedEntityRef)
 {
     VisitExpression(relatedEntityRef.TargetEntityReference);
 }