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