Пример #1
0
        public ActionResult Remove(Tour tour)
        {
            if (!repository.IfExist(tour))
            {
                return(NotFound());
            }

            repository.Remove(tour);
            return(NoContent());
        }
Пример #2
0
 public IActionResult DeleteConfirm(string Id)
 {
     if (HttpContext.Session.GetString("ID") == null)
     {
         return(RedirectToAction("Login", "Admin"));
     }
     else
     {
         tourRepository.Remove(Id);
         return(RedirectToAction("Index"));
     }
 }