public async Task Execute(ProductId id, ProductName newName)
        {
            var product = await productFinder.Find(id).ConfigureAwait(false);

            product.Rename(newName);
            await productRepository.Modify(product).ConfigureAwait(false);
        }
Exemple #2
0
        public async Task <Product> Execute(ProductId id)
        {
            var product = await domainFinder.Find(id).ConfigureAwait(false);

            return(product);
        }
Exemple #3
0
        public async Task Execute(ProductId id)
        {
            var product = await productFinder.Find(id).ConfigureAwait(false);

            await productRepository.Remove(product).ConfigureAwait(false);
        }