public IActionResult Put(int id,
                          [FromBody] GenreDto dto,
                          [FromServices] IUpdateGenreCommand command)
 {
     dto.Id = id;
     _executor.ExecuteCommand(command, dto);
     return(StatusCode(StatusCodes.Status204NoContent));
 }
Beispiel #2
0
 public GenreController(IGetGenreCommand getGenres, IGetOneGenreCommand getOneGenre, ICreateGenreCommand createGenre, IDeleteGenreCommand deleteGenre, IUpdateGenreCommand updateGenre)
 {
     _getGenres   = getGenres;
     _getOneGenre = getOneGenre;
     _createGenre = createGenre;
     _deleteGenre = deleteGenre;
     _updateGenre = updateGenre;
 }
Beispiel #3
0
 public GenresService(IAddGenreCommand addGenreCommand,
                      IUpdateGenreCommand updateGenreCommand,
                      IListAllGenresQuery listAllGenresQuery,
                      IGenreSelectListQuery genreSelectListQuery)
 {
     _addGenreCommand      = addGenreCommand;
     _updateGenreCommand   = updateGenreCommand;
     _listAllGenresQuery   = listAllGenresQuery;
     _genreSelectListQuery = genreSelectListQuery;
 }
Beispiel #4
0
 public void Put(int id, [FromBody] GenreDto dto,
                 [FromServices] IUpdateGenreCommand command)
 {
     dto.Id = id;
     _executor.ExecuteCommand(command, dto);
 }