public async Task <ActionResult <List <Flight> > > GetFlightsByOriginCountry(int country_id) { FlightsCenterSystem.GetInstance().login(GetLoginToken().Name, GetLoginToken().Password, out LoginToken <Object> l, out FacadeBase f); facade = f as LoggedInAirlineFacade; var result = await Task.Run(() => facade.GetFlightsByOriginCountry(country_id)); return(StatusCode(200, result)); }