internal static SqlQuerySpec TranslateQuery(Expression inputExpression) { inputExpression = ConstantEvaluator.PartialEval(inputExpression); SqlQuery query = ExpressionToSql.TranslateQuery(inputExpression); StringBuilder builder = new StringBuilder(); query.AppendToBuilder(builder); return(new SqlQuerySpec(builder.ToString())); }