public CategoryController( IGetCategoryQuery getCategoryQuery, ISaveCategoryCommand saveCategoryCommand) { _getCategoryQuery = getCategoryQuery; _saveCategoryCommand = saveCategoryCommand; }
public ProductController(IGetProductQuery getProductQuery, IGetRelatedProductQuery getRelatedProductQuery, IGetProductDetailQuery getProductDetailQuery, IGetRateQuery getRateQuery, IGetCommentQuery getCommentQuery, IGetCategoryQuery getCategoryQuery, ICreateCommentCommand createCommentCommand, ICreateRateCommand createRateCommand, IUpdateCommentCommand updateCommentCommand, IDeleteCommentCommand deleteCommentCommand) { this.getProductQuery = getProductQuery; this.getRelatedProductQuery = getRelatedProductQuery; this.getProductDetailQuery = getProductDetailQuery; this.getRateQuery = getRateQuery; this.getCommentQuery = getCommentQuery; this.getCategoryQuery = getCategoryQuery; this.createCommentCommand = createCommentCommand; this.createRateCommand = createRateCommand; this.updateCommentCommand = updateCommentCommand; this.deleteCommentCommand = deleteCommentCommand; }
public IActionResult Get(int id, [FromServices] IGetCategoryQuery command) { return(Ok(_executor.ExecuteQuery(command, id))); }
public IActionResult Get( [FromQuery] CategorySearch search, [FromServices] IGetCategoryQuery query) { return(Ok(_executor.ExecuteQuery(query, search))); }