Exemplo n.º 1
0
        private static Order0 CreateOrder()
        {
            Product0 p1 = new Product0 {
                ID = 1, Description = "p2", Price = 9
            };
            Product0 p2 = new Product0 {
                ID = 2, Description = "p3", Price = 6
            };

            Order0 order = new VIPOrder
            {
                ID          = 4,
                Description = "Order for John Doe. Use nice giftwrap",
                OrderLines  = new List <OrderLine0>
                {
                    new OrderLine0 {
                        ID = 5, Amount = 1, Product = p1
                    },
                    new OrderLine0 {
                        ID = 6, Amount = 10, Product = p2
                    },
                }
            };

            return(order);
        }
Exemplo n.º 2
0
        private static Order CreateOrder()
        {
            Product p1 = new Product { ID = 1, Description = "p1", Price = 9 };
            Product p2 = new Product { ID = 2, Description = "p2", Price = 6 };

            Order order = new VIPOrder
            {
                ID = 4,
                Description = "Order for John Doe.",
                OrderLines = new List<OrderLine>()
                {
                    new OrderLine { ID = 5, Amount = 1, Product = p1},
                    new OrderLine { ID = 6, Amount = 10, Product = p2},
                }
            };

            return order;
        }