Exemple #1
0
        private static async Task Run(IProductRepository productRepository, IProductWriter productWriter)
        {
            Product product = new Product()
            {
                Name  = "Shoes",
                Price = 129.99
            };

            await productRepository.Create(product);

            Product savedProduct = await productRepository.GetById(product.Id);

            await productWriter.WriteProduct(savedProduct);
        }