Exemple #1
0
        public async Task <ActionResult> GetAdults([FromQuery] int?id, [FromQuery] string?firstName, [FromQuery] string?sex)
        {
            try
            {
                IList <Adult> adults = await _adultService.ReadAllAdultsAsync(id, firstName, sex);

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