コード例 #1
0
 public IActionResult Post(
     [FromBody] CategoryDto dto,
     [FromServices] ICreateCategoryCommand command)
 {
     _executor.ExecuteCommand(command, dto);
     return(StatusCode(StatusCodes.Status201Created));
 }
コード例 #2
0
 public CategoriesController(IGetCategoriesCommand searchCategoriesCommand, IGetCategoryCommand getOneCategoryCommand, ICreateCategoryCommand createCategoryCommand, IEditCategoryCommand editCategoryCommand, IDeleteCategoryCommand deleteCategoryCommand)
 {
     _searchCategoriesCommand = searchCategoriesCommand;
     _getOneCategoryCommand   = getOneCategoryCommand;
     _createCategoryCommand   = createCategoryCommand;
     _editCategoryCommand     = editCategoryCommand;
     _deleteCategoryCommand   = deleteCategoryCommand;
 }
コード例 #3
0
 public CategoryController(ICreateCategoryCommand createCategory)
 {
     _createCategory = createCategory;
 }
コード例 #4
0
 public CategoriesController(ICreateCategoryCommand createCategory, IGetCategoriesCommand getCategories)
 {
     _createCategory = createCategory;
     _getCategories  = getCategories;
 }
コード例 #5
0
 public void Post([FromBody] CategoryDto dto, [FromServices] ICreateCategoryCommand command)
 {
     _executor.ExecuteCommand(command, dto);
 }
コード例 #6
0
 public CategoryController(IGetCategoriesListQuery getCategoriesListQuery, ICreateCategoryCommand createCategoryCommand)
 {
     _getCategoriesListQuery = getCategoriesListQuery;
     _createCategoryCommand  = createCategoryCommand;
 }
コード例 #7
0
 public CategoryController(IListCategoryCommand listCategoryCommand, ICreateCategoryCommand createCategoryCommand)
 {
     _listCategoryCommand   = listCategoryCommand;
     _createCategoryCommand = createCategoryCommand;
 }
コード例 #8
0
 public CategoryController(ICreateCategoryCommand command, IGetCategoriesCommand getCategoriesCommand)
 {
     _command = command;
     _getCategoriesCommand = getCategoriesCommand;
 }