Exemple #1
0
 private static CreateOrderCommand CreateOrderCommand(Guid orderId)
 {
     var product = new Product { Id = Guid.NewGuid(), Name = "some product name", Price = (decimal)5.54 };
     var details = new List<OrderDetail>();
     details.Add(new OrderDetail(product, 3));
     details.Add(new OrderDetail(product, 5));
     details.Add(new OrderDetail(product, 8));
     var command = new CreateOrderCommand(orderId, details);
     return command;
 }
 public OrderDetail(Product product, int quantity)
 {
     Product = product;
     Quantity = quantity;
 }