public IActionResult CreateAuthor([FromBody] AuthorInputModel body) { if (!ModelState.IsValid) { throw new ModelFormatException("Model not properly formatted"); } var entity = _authorsService.CreateAuthor(body); return(CreatedAtRoute("GetAuthorById", new { authorId = entity.Id }, null)); }