public IActionResult Delete(string Id) { if (HttpContext.Session.GetString("ID") == null) { return(RedirectToAction("Login", "Admin")); } else { if (Id == null) { //Error return(RedirectToAction("NotFoundPage", "Home")); } else { Tour model = tourRepository.getTour(Id); return(View(model)); } } }