public void AppendOrdering(OrderingExpression orderingExpression)
 {
     if (_orderings.FirstOrDefault(o => o.Expression.Equals(orderingExpression.Expression)) == null)
     {
         _orderings.Add(orderingExpression);
     }
 }
Ejemplo n.º 2
0
        protected override Expression VisitOrdering(OrderingExpression orderingExpression)
        {
            Visit(orderingExpression.Expression);

            if (!orderingExpression.Ascending)
            {
                _sqlBuilder.Append(" DESC");
            }

            return(orderingExpression);
        }
        public void ApplyOrdering(OrderingExpression orderingExpression)
        {
            if (IsDistinct ||
                Limit != null ||
                Offset != null)
            {
                throw new InvalidOperationException("See issue#16156");
            }

            _orderings.Clear();
            _orderings.Add(orderingExpression);
        }
 protected abstract Expression VisitOrdering(OrderingExpression orderingExpression);