public IActionResult CreateAuthorCollection([FromBody] IEnumerable <AuthorCreateDTO> authors) { if (authors == null) { return(BadRequest()); } var entities = Mapper.Map <AuthorCreateDTO, Author>(authors).ToList(); AuthorsService.AddRange(entities); var model = Mapper.Map <Author, AuthorDTO>(entities); var ids = entities .Select(p => p.Id.ToString()) .Aggregate((i, j) => $"{i},{j}"); return(CreatedAtRoute(nameof(GetAuthorsCollection), new { ids }, model)); }