Beispiel #1
0
        public async Task <IHttpActionResult> GetAll()
        {
            var request = new GetAllProductsRequest();

            var response = await _productHandler.Handle(request);

            return(Ok(response.Products));
        }
        public CommandResult Create(ProductCreateCommand command)
        {
            var result = _handler.Handle(command);

            return(result);
        }
 public async Task <ICommandResult> Post([FromBody] CreateProductCommand product)
 => (CreateProductCommandResult)await _productHandler.Handle(product);