public IActionResult Edit(ChiTietTourVM chiTietTourVM) { chiTietRepo.Delete(chiTietTourVM.TourId); tourRepo.Delete(chiTietTourVM.TourId); Create(chiTietTourVM); giaRepo.UpdateIdTour(chiTietTourVM, LastId); return(RedirectToAction("index")); }
// GET: Tournaments/Delete/5 public ViewResult Delete(int?id) { if (id == null) { return(View("~/View/Shared/NotFoundErrorView.cshtml")); } var tournaments = _repo.Delete(id); if (tournaments == null) { return(View("~/View/Shared/NotFoundErrorView.cshtml")); } return(View(tournaments)); }