Пример #1
0
 public IActionResult Them(TheLoaiIndexVm theLoaiVM)
 {
     if (ModelState.IsValid)
     {
         theLoaiService.ThemTheLoai(theLoaiVM.theLoai);
         return(RedirectToAction("Index"));
     }
     return(View());
 }
Пример #2
0
 public IActionResult ThemTheLoai(TheLoaiModel model)
 {
     if (ModelState.IsValid)
     {
         _theLoaiService.ThemTheLoai(model);
         return(Redirect("Index"));
     }
     return(View(model));
 }