public QueryHotelCityResponseViewModel QueryHotelCity(QueryHotelCityRequestViewModel request) { List <HotelCountryModel> ciHotelCountryModels = _queryHotelCityServiceBll.QueryHotelCity(request.QueryCityType); List <HotelCountryViewModel> hotelCountryModels = Mapper.Map <List <HotelCountryModel>, List <HotelCountryViewModel> >(ciHotelCountryModels); return(new QueryHotelCityResponseViewModel() { CountryList = hotelCountryModels }); }
public async Task <ResponseBaseViewModel <QueryHotelCityResponseViewModel> > QueryHotelCity( [FromBody] QueryHotelCityRequestViewModel request) { request.Cid = this.GetCid(); QueryHotelCityResponseViewModel viewModel = new QueryHotelCityResponseViewModel(); await new TaskFactory().StartNew(() => { viewModel = _queryHotelCityApplication.QueryHotelCity(request); }); ResponseBaseViewModel <QueryHotelCityResponseViewModel> v = new ResponseBaseViewModel <QueryHotelCityResponseViewModel> { Flag = new ResponseCodeViewModel() { Code = 0, MojoryToken = this.GetToken() }, Data = viewModel }; return(v); }