public CategoryController(IGetCategoryCommand getCategoryCommand, IGetCategoriesCommand getCategoriesCommand, IAddCategoryCommand addCategoryCommand, IEditCategoryCommand editCategoryCommand, IDeleteCategoryCommand deleteCategoryCommand)
 {
     _getCategoriesCommand  = getCategoriesCommand;
     _getCategoryCommand    = getCategoryCommand;
     _addCategoryCommand    = addCategoryCommand;
     _editCategoryCommand   = editCategoryCommand;
     _deleteCategoryCommand = deleteCategoryCommand;
 }
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;
 }
Beispiel #3
0
 public CategoriesController(IGetCategoriesCommand getCategoriesCommand, IGetCategoryCommand getCategoryCommand, IAddCategoryCommand addCategoryCommand, IEditCategoryCommand editCategoryCommand, IDeleteCategoryCommand deleteCategoryCommand)
 {
     this.getCategoriesCommand  = getCategoriesCommand;
     this.getCategoryCommand    = getCategoryCommand;
     this.addCategoryCommand    = addCategoryCommand;
     this.editCategoryCommand   = editCategoryCommand;
     this.deleteCategoryCommand = deleteCategoryCommand;
 }
Beispiel #4
0
 public CategoryController(IGetCategory getCategory, IEditCategoryCommand editCategory, IDeleteCategoryCommand deleteCategory, IGetOneCategory oneCategory, IAddCategoryCommand addCategory)
 {
     _getCategory    = getCategory;
     _editCategory   = editCategory;
     _deleteCategory = deleteCategory;
     _oneCategory    = oneCategory;
     _addCategory    = addCategory;
 }
 public CategoriesController(Context context, IGetCategoriesCommand getCommand, IGetCategoryCommand getOneCommand, IAddCategoryCommand addCommand, IEditCategoryCommand editCommand, IDeleteCategoryCommand deleteCommand)
 {
     _context       = context;
     _getCommand    = getCommand;
     _getOneCommand = getOneCommand;
     _addCommand    = addCommand;
     _editCommand   = editCommand;
     _deleteCommand = deleteCommand;
 }
Beispiel #6
0
 public CategoryController(IGetCateroryApi command, IGetOneCategory oneCategory, IAddCategoryCommand addCategory, IEditCategoryCommand editCategory, IDeleteCategoryCommand deleteCategory, LoggedUser loggedUser)
 {
     _command        = command;
     _oneCategory    = oneCategory;
     _addCategory    = addCategory;
     _editCategory   = editCategory;
     _deleteCategory = deleteCategory;
     _loggedUser     = loggedUser;
 }
Beispiel #7
0
        public IActionResult Put(int id,
                                 [FromBody] CategoryDto dto,
                                 [FromServices] IEditCategoryCommand command)
        {
            dto.Id = id;

            _executor.ExecuteCommand(command, dto);
            return(NoContent());
        }
 public CategoriesController(IGetCategoriesCommand getCommand, IGetCategoryCommand getOneCommand, IAddCategoryCommand addCommand, IEditCategoryCommand editCommand, IDeleteCategoryCommand deleteCommand, LoggedUser user)
 {
     _getCommand    = getCommand;
     _getOneCommand = getOneCommand;
     _addCommand    = addCommand;
     _editCommand   = editCommand;
     _deleteCommand = deleteCommand;
     _user          = user;
 }
Beispiel #9
0
 public CategoriesController(IAddCategoryCommand addCategory,
                             IGetCategoriesCommand getCategories,
                             IGetCategoryCommand getCategory,
                             IEditCategoryCommand editCategory,
                             IDeleteCategoryCommand deleteCategory)
 {
     _addCategory    = addCategory;
     _getCategories  = getCategories;
     _getCategory    = getCategory;
     _editCategory   = editCategory;
     _deleteCategory = deleteCategory;
 }