/// <summary> /// method checks if the hotel exists first, if it doesn't return not found. Otherwise display the hotel's info. /// </summary> /// <param name="id"></param> /// <returns></returns> // GET: Hotels/Details/5 public async Task <IActionResult> Details(int id) { if (id <= 0) { return(NotFound()); } Hotel hotel = await _context.GetHotelByIDAsync(id); if (hotel == null) { return(NotFound()); } return(View(hotel)); }