示例#1
0
 public Task <IActionResult> GetEntitiesByPaged(int pageSize, int pageIndex)
 {
     return(Task.Factory.StartNew <IActionResult>(() =>
     {
         var total = ManagerRepository.Count(m => true);
         var rows = ManagerRepository.GetByPagination(m => true, pageSize, pageIndex, true,
                                                      m => m.Id).ToList();
         return Json(PaginationResult.PagedResult(rows, total, pageSize, pageIndex));
     }));
 }