/// <summary> Previews and changes if necessary the entire (outermost) expression. </summary> /// <param name="e"></param> /// <remarks> /// <para> /// Derived classes can override this method to manipulate the entire expression prior to SQL generation. /// </para> /// </remarks> public virtual SelectExpression PreviewSelect(SelectExpression e) { //None of the servers support in one query COUNT and Limit (FETCH NEXT for MS SQL) if (e.HasLimit() && e.HasOutAggregates()) Util.Throw("Invalid LINQ expression: Server does not support COUNT(*) and LIMIT (MS SQL: FETCH NEXT) in one query."); return e; }