public IActionResult Them(TheLoaiIndexVm theLoaiVM) { if (ModelState.IsValid) { theLoaiService.ThemTheLoai(theLoaiVM.theLoai); return(RedirectToAction("Index")); } return(View()); }
public IActionResult ThemTheLoai(TheLoaiModel model) { if (ModelState.IsValid) { _theLoaiService.ThemTheLoai(model); return(Redirect("Index")); } return(View(model)); }