// GET: Hotels/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var hotel = await _hotel.GetHotelById(id); if (hotel == null) { return(NotFound()); } return(View(hotel)); }