예제 #1
0
        public void AddOrderByClause(HqlExpression orderBy, HqlDirectionStatement direction)
        {
            var orderByRoot = Root.NodesPreOrder.Where(n => n is HqlOrderBy).FirstOrDefault();

            if (orderByRoot == null)
            {
                orderByRoot = TreeBuilder.OrderBy();
                Root.As<HqlQuery>().AddChild(orderByRoot);
            }

            orderByRoot.AddChild(orderBy);
            orderByRoot.AddChild(direction);
        }
예제 #2
0
		public void AddOrderByClause(HqlExpression orderBy, HqlDirectionStatement direction)
		{
			if (_orderBy == null)
				_orderBy = TreeBuilder.OrderBy();

			_orderBy.AddChild(orderBy);
			_orderBy.AddChild(direction);
		}