public IActionResult DeleteConfirmed(int id) { var restaurant = _restRepo.GetRestaurantById(id); _restRepo.DeleteRestaurant(restaurant); _restRepo.SaveChanges(); return(RedirectToAction(nameof(Index))); }
public IActionResult DeleteConfirmed(int id) { var restaurant = _restRepo.GetRestaurantById(id); _restRepo.DeleteRestaurant(restaurant); _restRepo.SaveChanges(); return(RedirectToAction(nameof(Index))); }