Example #1
0
        public CheckoutSummary GetSummary(string sessionID)
        {
            if (sessionID == SessionID)
            {
                CheckoutSummary summary = new CheckoutSummary();

                IList <Product> products = new List <Product>();
                products.Add(new Product()
                {
                    ProductName = "Apples", UnitPrice = 2.55m
                });
                products.Add(new Product()
                {
                    ProductName = "Pears", UnitPrice = 1.99m
                });
                products.Add(new Product()
                {
                    ProductName = "Soup", UnitPrice = 2.49m
                });
                products.Add(new Product()
                {
                    ProductName = "Steak", UnitPrice = 4.99m
                });

                summary.Products = products;

                return(summary);
            }

            return(null);
        }
        public CheckoutSummary GetSummary(string sessionID)
        {
            if (sessionID == SessionID)
            {
                CheckoutSummary summary = new CheckoutSummary();

                IList<Product> products = new List<Product>();
                products.Add(new Product() { ProductName = "Apples", UnitPrice = 2.55m });
                products.Add(new Product() { ProductName = "Pears", UnitPrice = 1.99m });
                products.Add(new Product() { ProductName = "Soup", UnitPrice = 2.49m });
                products.Add(new Product() { ProductName = "Steak", UnitPrice = 4.99m });

                summary.Products = products;

                return summary;
            }

            return null;
        }