public async Task <double> GetDistanceBetweenAirportsAsync(string iataFrom, string iataTo) { Airport airportFrom = await _airportService.GetAirportAsync(iataFrom); Airport airportTo = await _airportService.GetAirportAsync(iataTo); return(DistanceHelper.GetDistanceInMiles(airportFrom.Location.Lat, airportFrom.Location.Lon, airportTo.Location.Lat, airportTo.Location.Lon)); }
public async Task <ActionResult> GetAirportAsync(string id) { var airport = await _service.GetAirportAsync(id); return(airport); }