Ejemplo n.º 1
0
 public CategoryController(IGetCategory getCategory, IEditCategoryCommand editCategory, IDeleteCategoryCommand deleteCategory, IGetOneCategory oneCategory, IAddCategoryCommand addCategory)
 {
     _getCategory    = getCategory;
     _editCategory   = editCategory;
     _deleteCategory = deleteCategory;
     _oneCategory    = oneCategory;
     _addCategory    = addCategory;
 }
Ejemplo n.º 2
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;
 }
 public IActionResult Get(int id, [FromServices] IGetOneCategory query)
 {
     return(Ok(_executor.ExecuteQuery(query, id)));
 }