Exemplo n.º 1
0
        /// <summary>
        /// Sıralanmış Queryble nesnesini getirir.
        /// </summary>
        /// <returns></returns>
        private IOrderedQueryable <T> GetOrderQueryable(IQueryable <T> queryable, OrderItemDto orderItem)
        {
            IOrderedQueryable <T> orderedQueryable;

            if (orderItem.Descending)
            {
                orderedQueryable = queryable.OrderByDescending(GetOrderBinaryExpression(orderItem.Column));
            }
            else
            {
                orderedQueryable = queryable.OrderBy(GetOrderBinaryExpression(orderItem.Column));
            }

            return(orderedQueryable);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Sıralanmış Queryble nesnesini getirir.
 /// </summary>
 /// <returns></returns>
 private IOrderedQueryable <T> GetOrderQueryable(IOrderedQueryable <T> queryable, OrderItemDto orderItem)
 {
     if (!string.IsNullOrEmpty(orderItem.Column))
     {
         if (orderItem.Descending)
         {
             queryable = queryable.ThenByDescending(GetOrderBinaryExpression(orderItem.Column));
         }
         else
         {
             queryable = queryable.ThenBy(GetOrderBinaryExpression(orderItem.Column));
         }
     }
     return(queryable);
 }