Esempio n. 1
0
        public async Task <ActionResult <IList <Adult> > > getAdults()
        {
            try
            {
                IList <Adult> adults = await service.GetPersons();

                return(Ok(adults));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(StatusCode(500, e.Message));
            }
        }