예제 #1
0
 public ActionResult Index(int pageNum = 1)
 {
     using (var productsManager = new ProductsManager())
     {
         var productsPaginatedModel = new ProductsPaginatedModel
         {
             Products       = productsManager.GetList(),
             CurrentPage    = pageNum,
             ProductPerPage = 10,
             CanEdit        = CanEdit,
             CanAdd         = CanAdd
         };
         return(View(productsPaginatedModel));
     }
 }