public override void VisitSelectClause(SelectClause selectClause, QueryModel queryModel)
        {
            var joins = LeftJoinDetector.Detect(selectClause.Selector, new NameGenerator(queryModel), _sessionFactory);

            if (joins.Joins.Count > 0)
            {
                selectClause.Selector = joins.Selector;

                queryModel.TransformExpressions(e => ExpressionSwapper.Swap(e, joins.ExpressionMap));

                foreach (var join in joins.Joins)
                {
                    queryModel.BodyClauses.Add(join);
                }
            }
        }
        public static Expression Swap(Expression expression, Dictionary<Expression, Expression> expressionMap)
        {
            var swapper = new ExpressionSwapper(expressionMap);

            return swapper.VisitExpression(expression);
        }
        public static Expression Swap(Expression expression, Dictionary <Expression, Expression> expressionMap)
        {
            var swapper = new ExpressionSwapper(expressionMap);

            return(swapper.VisitExpression(expression));
        }