//// POST: api/Authors //[ResponseType(typeof(Author))] public IHttpActionResult PostAuthor(AuthorDto author) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _authorsService.Add(author); return(CreatedAtRoute("DefaultApi", new { id = author.Id }, author)); }