コード例 #1
0
        public async Task<TripOptionViewModels> GetFlights(SearchFlightRequest request)
        {
            string tripOptionsResponse = await SendRequest(request);

            Response response = new Response(tripOptionsResponse);
            TripOptionViewModels tripOptions = new TripOptionViewModels(response);

            return tripOptions;
        }
コード例 #2
0
 public async Task<ActionResult> Search(SearchFlightRequest request)
 {
     var model = await _flightsService.GetFlights(request);
     return View(model);
 }
コード例 #3
0
 public ActionResult Index()
 {
     var model = new SearchFlightRequest();
     return View(model);
 }
コード例 #4
0
 private async Task<string> SendRequest(SearchFlightRequest request)
 {
     var qpxRequest = Mapper.ToQpxRequest(request);
     return await SendRequest(qpxRequest);
 }