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