Exemplo n.º 1
0
 /// <summary>
 /// 排序并分页
 /// </summary>
 /// <typeparam name="TEntity"></typeparam>
 /// <param name="query"></param>
 /// <param name="input"></param>
 /// <returns></returns>
 public static IQueryable <TEntity> DoPage <TEntity>(this IQueryable <TEntity> query,
                                                     PageInput input)
 {
     return(query.DoPage(input.PageIndex, input.PageSize));
 }
Exemplo n.º 2
0
 /// <summary>
 /// 排序并分页
 /// </summary>
 /// <typeparam name="TEntity"></typeparam>
 /// <param name="query"></param>
 /// <param name="order"></param>
 /// <param name="input"></param>
 /// <returns></returns>
 public static IQueryable <TEntity> DoPage <TEntity>(this IQueryable <TEntity> query,
                                                     OrderByBase <TEntity> order, PageInput input)
 {
     return
         (query
          .OrderBy(order, input.OrderField, input.OrderType)
          .DoPage(input.PageIndex, input.PageSize));
 }