public async Task <GenericCommandResult <ProductEntity> > Delete(
            [FromBody] DeleteProductCommand command,
            [FromServices] IProductHandler handler)
        {
            var result = (GenericCommandResult <ProductEntity>) await handler.HandleAsync(command);

            return(result);
        }
Пример #2
0
        public async Task Active_Product_Without_Id()
        {
            var result = (GenericCommandResult <ProductEntity>) await _handler.HandleAsync(_commandWithoutId);

            Assert.AreEqual(result.Success, false);
        }