public ActionResult Remove(Tour tour) { if (!repository.IfExist(tour)) { return(NotFound()); } repository.Remove(tour); return(NoContent()); }
public IActionResult DeleteConfirm(string Id) { if (HttpContext.Session.GetString("ID") == null) { return(RedirectToAction("Login", "Admin")); } else { tourRepository.Remove(Id); return(RedirectToAction("Index")); } }