public ActionResult Page(int PageNumber, int PageSize) { ViewBag.PageNumber = PageNumber; ViewBag.PageSize = PageSize; List <CategorieBLL> Model = new List <CategorieBLL>(); try { using (ContextBll ctx = new ContextBll()) { ViewBag.TotalCount = ctx.ObtainCategoriCount(); Model = ctx.GetCategorie(PageNumber * PageSize, PageSize); } return(View("Index", Model)); } catch (Exception ex) { ViewBag.Exception = ex; return(View("Error")); } }