protected override Expression VisitSubQuery(SubQueryExpression expression)
 {
     SubQueryConditionalExpander.ReWrite(expression.QueryModel);
     if (_nominate.Count > 0 && _subQueryCollectionType.IsAssignableFrom(expression.Type))
     {
         _nominate.Pop();
         _nominate.Push(true);
     }
     return(base.VisitSubQuery(expression));
 }
        public static void ReWrite(QueryModel queryModel)
        {
            var visitor = new SubQueryConditionalExpander();

            visitor.VisitQueryModel(queryModel);
        }