public bool RemoveFavoriteProduct(ProductBase product) { if (FieldValidationService.ValidateNotNull(product) == false) { throw new ArgumentException(); } return(_favoriteProducts.Remove(product)); }
public void Add(ProductBase product) { if (FieldValidationService.ValidateNotNull(product) == false || _cartItems.Contains(product)) { throw new ArgumentException(); } _cartItems.Add(product); }