예제 #1
0
        /// <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));
        }
예제 #2
0
        public ActionResult HotelDetails(int id)
        {
            HotelDto hotelmodel = new HotelDto();

            hotelmodel = _hotelsManager.GetHotel(id);

            hotelmodel.Rating = (float)_ratingManager.GetRatingByHotelID(id);

            return(View(hotelmodel));
        }