private void Apply(ProductShipped shipProduct) { var product = GetProduct(shipProduct.Sku); product.Shipped += shipProduct.Quantity; _dbContext.SaveChanges(); }
public void ProductShippedCommand(IBus bus) { Console.WriteLine("Please press enter to ship product"); Console.ReadLine(); ConsoleKeyInfo key = Console.ReadKey(); if (key.Key != ConsoleKey.Enter) { return; } var product = new ProductShipped() { ProductId = Guid.NewGuid(), ShippingAddress = "Pune" }; bus.Send("host", product); Console.WriteLine("Product shipped of the id:{0}", product.ProductId); }
public void Handle(ProductShipped message) { Data.ProductId = message.ProductId; RequestTimeout <OrderTimeout>(TimeSpan.FromSeconds(5)); }