Beispiel #1
0
 public CategoriesController(
     IGetCategories getCategories,
     IGetCategoriesByPayee getCategoriesByPayee,
     IGetCategoryByName getCategoryByName,
     IUpsertCategory upsertCategory,
     IDeleteCategory deleteCategory,
     IGetPayeeByName getPayeeByName,
     Func <Try <Email>, string, CreateCategoryModel, Task <ValidationResult> > validate)
 {
     this.getCategories        = getCategories;
     this.getCategoriesByPayee = getCategoriesByPayee;
     this.getCategoryByName    = getCategoryByName;
     this.upsertCategory       = upsertCategory;
     this.deleteCategory       = deleteCategory;
     this.getPayeeByName       = getPayeeByName;
     this.validate             = validate;
 }
 public IActionResult Delete(int id, [FromServices] IDeleteCategory command)
 {
     executor.ExecuteCommand(command, id);
     return(NoContent());
 }
 public ItemsController(ILogger <ItemsController> logger, IGetItems IGetItems, IDeleteCategory IDeleteCategory)
 {
     _logger          = logger;
     _IGetItems       = IGetItems;
     _IDeleteCategory = IDeleteCategory;
 }