public IActionResult Post( [FromBody] GenreDto dto, [FromServices] ICreateGenreCommand command) { _executor.ExecuteCommand(command, dto); return(StatusCode(StatusCodes.Status201Created)); }
public GenreController(IGetGenreCommand getGenres, IGetOneGenreCommand getOneGenre, ICreateGenreCommand createGenre, IDeleteGenreCommand deleteGenre, IUpdateGenreCommand updateGenre) { _getGenres = getGenres; _getOneGenre = getOneGenre; _createGenre = createGenre; _deleteGenre = deleteGenre; _updateGenre = updateGenre; }
public void Post([FromBody] GenreDto dto, [FromServices] ICreateGenreCommand command) { _executor.ExecuteCommand(command, dto); }