/// <summary> /// Gets Hotel Details /// </summary> /// <param name="id"></param> /// <returns></returns> public async Task <IActionResult> Details(int id) { if (id <= 0) { return(NotFound()); } var hotel = await _hotels.GetHotel(id); if (hotel == null) { return(NotFound()); } return(View(hotel)); }
public ActionResult HotelDetails(int id) { HotelDto hotelmodel = new HotelDto(); hotelmodel = _hotelsManager.GetHotel(id); hotelmodel.Rating = (float)_ratingManager.GetRatingByHotelID(id); return(View(hotelmodel)); }