Esempio n. 1
0
        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)));
        }
Esempio n. 2
0
        public ActionResult <IList <Country> > GetAllCountries()
        {
            IList <Country> countries = _anonymousUserFacade.GetAllCountries();

            if (countries.Count == 0)
            {
                return(NoContent());
            }

            return(Ok(countries));
        }
Esempio n. 3
0
        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));
        }