public async Task <ActionResult <Adult> > Add([FromBody] Adult adult) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { await adultService.Add(adult); return(Created($"/{adult.Id}", adult)); } catch (Exception e) { Console.WriteLine(e); return(StatusCode(500, e.Message)); } }