Example #1
0
        public IActionResult Details(int categoryId)
        {
            HomeDetailsViewModel model = new HomeDetailsViewModel();

            model.LoadModelData(_unitOfWork, categoryId);
            return(View(model));
        }
Example #2
0
 public IActionResult Details(HomeDetailsViewModel model)
 {
     if (ModelState.IsValid)
     {
         model.LoadModelData(_unitOfWork, Convert.ToInt32(model.SelectedId));
         return(View(model));
     }
     else
     {
         return(View(model));
     }
 }