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); }
public async Task <Product> Execute(ProductId id) { var product = await domainFinder.Find(id).ConfigureAwait(false); return(product); }
public async Task Execute(ProductId id) { var product = await productFinder.Find(id).ConfigureAwait(false); await productRepository.Remove(product).ConfigureAwait(false); }