public void AddToCart(AbstractProduct product, int quantity) { _cartProducts.Add(CartProductFactory.Create(product, quantity)); }
public CartProduct(AbstractProduct prod, int quantity) { Product = prod; Quantity = quantity; Subtotal = quantity * Product.ProductPrice; }
public static CartProduct Create(AbstractProduct product, int quantity) { return(new CartProduct(product, quantity)); }