public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } var reservation = IReservationService.GetReservation((int)id); ViewBag.RoomTypes = IRoomTypeService .GetRoomTypesForSpecificHotel(reservation.Room.RoomType.HotelId) .ToList(); if (reservation == null) { return(NotFound()); } return(View(reservation)); }