public ActionResult GetAllRequests(int?page) { int pageSize = 5; int pageNumber = (page ?? 1); var colection = new RequestContext().Requests.OrderByDescending(x => x.InitialDate); return View(colection.ToPagedList(pageNumber, pageSize)); }
public ActionResult GetRequestsById(int? page) { string id = User.Identity.GetUserId(); var collection = new RequestContext().Requests.Where(x => x.ClientID == id).OrderByDescending(x => x.InitialDate); int pageSize = 5; int pageNumber = (page ?? 1); return View("GetAllRequests", collection.ToPagedList(pageNumber,pageSize)); }