public HotelSearchViewModel()
        {
            FriendlyMessage = new List <FriendlyMessage>();

            HotelSearch = new HotelSearchInfo();

            HotelSearchList = new List <HotelSearchInfo>();

            HotelSearchExtraList = new List <HotelSearchInfo>();

            HotelSearchRoomList = new List <HotelSearchInfo>();

            HotelSearchRoomMealOccupancyPrice = new HotelSearchRoomMealOccupancyPrice();

            HotelSearchRoomMealOccupancyPriceList = new List <HotelSearchRoomMealOccupancyPrice>();

            HotelSearchFilter = new HotelSearchFilter();

            HotelSearchFilterList = new List <HotelSearchFilter>();

            HotelTariff = new HotelTariffInfo();

            HotelTariffs = new List <HotelTariffInfo>();

            Hotels = new List <HotelInfo>();

            RoomTypes = new List <RoomTypeInfo>();

            Occupancies = new List <OccupancyInfo>();

            Cities = new List <CityInfo>();

            Pager = new PaginationInfo();
        }
Esempio n. 2
0
        public async Task <ActionResult> Search(int?cityId, int?rating, int?minPrice, int?maxPrice)
        {
            var filter = new HotelSearchFilter
            {
                CityId   = cityId,
                Rating   = rating,
                MinPrice = minPrice,
                MaxPrice = maxPrice
            };
            var hotels = await _hotelsSearchQuery.Get(filter);

            return(Ok(hotels));
        }