public async Task <ActionResult <IList <Country> > > GetAllCountries() { IList <Country> countries = new List <Country>(); countries = await Task.Run(() => m_facade.GetAllCountries()); return(Ok(JsonConvert.SerializeObject(countries))); }
public ActionResult <IList <Country> > GetAllCountries() { IList <Country> countries = _anonymousUserFacade.GetAllCountries(); if (countries.Count == 0) { return(NoContent()); } return(Ok(countries)); }
public IHttpActionResult GetAllCountries() { FCS = FlyingCenterSystem.GetFlyingCenterSystemInstance(); IAnonymousUserFacade anonymousFacade = FCS.GetFacade(null) as IAnonymousUserFacade; IList <Country> countries = anonymousFacade.GetAllCountries(); if (countries.Count == 0) { return(NotFound()); } return(Ok(countries)); }