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 <Aircraft> Get(string model) { try { return(Ok(AircraftService.GetByModel(model))); } catch (Exception ex) { logger.LogError(1, ex, "No aircraft found with model {1}", model); return(NotFound($"No aircraft found with model {model}")); } }