Esempio n. 1
0
        public ShoppingCart GetCart(Guid customerId)
        {
            var cart = this.RS.Where(item => item.CustomerId == customerId).FirstOrDefault();

            if (cart == null)
            {
                cart = ShoppingCartFactory.Create(customerId);
                this.RS.Add(cart);
            }
            return(cart);
        }