Exemplo n.º 1
0
        public async Task <ActionResult <IList <Adult> > > GetAdultsAsync()
        {
            try
            {
                IList <Adult> adults = await _adultService.GetAllAdultsAsync();

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