public SimulationResult SimulateFlight(string fromIata, string toIata, string aircraftModel) { var fromAirport = airportService.GetByIataCode(fromIata); var toAirport = airportService.GetByIataCode(toIata); var aircraft = aircraftService.GetByModel(aircraftModel); return(SimulateFlight(fromAirport, toAirport, aircraft)); }
public ActionResult <Airport> Get(string iataCode) { try { return(Ok(airportService.GetByIataCode(iataCode))); } catch (Exception ex) { logger.LogError(1, ex, "No airport found with iATA code {1}", iataCode); return(NotFound($"No airport found with iATA code {iataCode}")); } }