protected virtual bool CompareAggregateSubquery(DbAggregateSubqueryExpression a, DbAggregateSubqueryExpression b) { return ( this.Compare(a.AggregateAsSubquery, b.AggregateAsSubquery) && this.Compare(a.AggregateInGroupSelect, b.AggregateInGroupSelect) && a.GroupByAlias == b.GroupByAlias ); }
protected DbAggregateSubqueryExpression UpdateAggregateSubquery(DbAggregateSubqueryExpression aggregate, DbScalarExpression subquery) { if (subquery != aggregate.AggregateAsSubquery) { return(new DbAggregateSubqueryExpression(aggregate.GroupByAlias, aggregate.AggregateInGroupSelect, subquery)); } return(aggregate); }
protected override Expression VisitAggregateSubquery(DbAggregateSubqueryExpression aggregate) { if (this.map.TryGetValue(aggregate, out Expression mapped)) { return(mapped); } return(this.Visit(aggregate.AggregateAsSubquery)); }
protected virtual Expression VisitAggregateSubquery(DbAggregateSubqueryExpression aggregate) { return(this.UpdateAggregateSubquery(aggregate, this.Visit(aggregate.AggregateAsSubquery) as DbScalarExpression)); }
protected override Expression VisitAggregateSubquery(DbAggregateSubqueryExpression aggregate) { this.aggregates.Add(aggregate); return(base.VisitAggregateSubquery(aggregate)); }