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