public static List <Expression> Find(Expression expression) { var finder = new SqlAggregateSubqueryFinder(); finder.Visit(expression); return(finder.aggregatesFound); }
private SqlAggregateSubqueryRewriter(Expression expr) { this.aggregateSubqueryInstances = new Dictionary <SqlAggregateSubqueryExpression, Expression>(); this.aggregateSubqueriesBySelectAlias = SqlAggregateSubqueryFinder.Find(expr).OfType <SqlAggregateSubqueryExpression>().ToLookup(a => a.GroupByAlias); }