GetAdults([FromQuery] int?id, [FromQuery] String firstname, [FromQuery] String lastname)
        {
            IList <Adult> adults;

            try
            {
                IList <Adult> filteredAdults = await _adultService.GetAdultsAsync();

                if (id != null)
                {
                    adults = filteredAdults.Where(a => a.Id == id).ToList();
                }
                else if (firstname != null)
                {
                    adults = filteredAdults.Where(a => a.FirstName.Equals(firstname, StringComparison.OrdinalIgnoreCase)).ToList();
                }
                else if (lastname != null)
                {
                    adults = filteredAdults.Where(a => a.LastName.Equals(lastname, StringComparison.OrdinalIgnoreCase)).ToList();
                }
                else
                {
                    adults = await _adultService.GetAdultsAsync();
                }
                return(Ok(adults));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(StatusCode(500, e.Message));
            }
        }
        public async Task <ActionResult <IList <Adult> > > GetAdults()
        {
            try
            {
                IList <Adult> todos = await AdultService.GetAdultsAsync();

                return(Ok(todos));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(StatusCode(500, e.Message));
            }
        }
        public async Task <ActionResult <IList <Adult> > > GetAdults([FromQuery] int?id)
        {
            try {
                IList <Adult> adults = await adultsService.GetAdultsAsync();

                return(Ok(adults));
            }
            catch (Exception e) {
                Console.WriteLine(e);
                return(StatusCode(500, e.Message));
            }
        }
        public async Task <ActionResult <IList <Adult> > > GetAdults([FromRoute] string Address)
        {
            try
            {
                IList <Adult> adults = await adultService.GetAdultsAsync(Address);

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