public ActionResult SearchHotel(SearchCriteriaModel searchCriteria) { if (!ModelState.IsValid) { var hotelGeneralErrorModel = new HotelGeneralModel { SearchCriteria = searchCriteria }; return(View(hotelGeneralErrorModel)); } SearchResultsModel searchResultsModel = _webApiInvoker.GetHotels(searchCriteria); var hotelGeneralModel = new HotelGeneralModel { HotelsList = searchResultsModel.Offers.Hotel, SearchCriteria = searchCriteria }; return(View(hotelGeneralModel)); }
public ActionResult SearchHotel() { var hotelGeneralModel = new HotelGeneralModel(); return(View(hotelGeneralModel)); }