public IActionResult Details(int categoryId) { HomeDetailsViewModel model = new HomeDetailsViewModel(); model.LoadModelData(_unitOfWork, categoryId); return(View(model)); }
public IActionResult Details(HomeDetailsViewModel model) { if (ModelState.IsValid) { model.LoadModelData(_unitOfWork, Convert.ToInt32(model.SelectedId)); return(View(model)); } else { return(View(model)); } }