public override void VisitOrderByClause(OrderByClause orderByClause, QueryModel queryModel, int index) { foreach (var clause in orderByClause.Orderings) { _hqlTree.AddOrderByClause(HqlGeneratorExpressionTreeVisitor.Visit(clause.Expression, VisitorParameters).AsExpression(), clause.OrderingDirection == OrderingDirection.Asc ? _hqlTree.TreeBuilder.Ascending() : (HqlDirectionStatement)_hqlTree.TreeBuilder.Descending()); } }
public override void VisitOrderByClause(OrderByClause orderByClause, QueryModel queryModel, int index) { foreach (var clause in orderByClause.Orderings) { var orderBy = HqlGeneratorExpressionVisitor.Visit(clause.Expression, VisitorParameters).ToArithmeticExpression(); var direction = clause.OrderingDirection == OrderingDirection.Asc ? _hqlTree.TreeBuilder.Ascending() : (HqlDirectionStatement)_hqlTree.TreeBuilder.Descending(); _hqlTree.AddOrderByClause(orderBy, direction); } }