public IActionResult Post( [FromBody] CategoryDto dto, [FromServices] ICreateCategoryCommand command) { _executor.ExecuteCommand(command, dto); return(StatusCode(StatusCodes.Status201Created)); }
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; }
public CategoriesController(ICreateCategoryCommand createCategory, IGetCategoriesCommand getCategories) { _createCategory = createCategory; _getCategories = getCategories; }
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; }
public CategoryController(ICreateCategoryCommand command, IGetCategoriesCommand getCategoriesCommand) { _command = command; _getCategoriesCommand = getCategoriesCommand; }