public IActionResult GetAllAircraft() { var response = new GetAllAircraftResponse(); try { response = _aircraftService.GetAllAircraft(new GetAllAircraftRequest()); } catch (Exception ex) { return(BadRequest(ex.ToString())); } if (response.IsSuccessful) { return(Ok(response.Aircraft)); } else { return(BadRequest(response.Message)); } }