예제 #1
0
 public void Delete(int id,
                    [FromServices] IDeleteProductCommand command)
 {
     _executor.ExecuteCommand(command, id);
 }
예제 #2
0
 public ProductsController(IGetProductsCommand getCommand, IGetProductCommand getOneCommand, IAddProductCommand addProductCommand, IDeleteProductCommand deleteProductCommand, IUpdateProductCommand updateProductCommand)
 {
     _getCommand    = getCommand;
     _getOneCommand = getOneCommand;
     _addCommand    = addProductCommand;
     _deleteCommand = deleteProductCommand;
     _updateCommand = updateProductCommand;
 }
예제 #3
0
 public IActionResult Delete(int id, [FromServices] IDeleteProductCommand command)
 {
     _executor.ExecuteCommand(command, id);
     return(StatusCode(StatusCodes.Status204NoContent));
 }