public async Task <IActionResult> Create([FromBody] GenreCreateUpdateRequest request) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var newlyAddedGenre = await _genresService.Create(request); return(CreatedAtRoute("GetGenre", new { id = newlyAddedGenre }, newlyAddedGenre)); }
public async Task <GenreDto> Post(GenreDto dto) { return(await _genresService.Create(dto)); }