Пример #1
0
 /// <summary>
 /// Adds a product to this category
 /// </summary>
 /// <param name="product">The product to add</param>
 public virtual void AddProduct(Product product)
 {
     if (!Products.Contains(product))
     {
         Products.Add(product);
         product.Categories.Add(this);
     }
 }
Пример #2
0
 /// <summary>
 /// Removes a product from this category
 /// </summary>
 /// <param name="product">The product to remove</param>
 public virtual void RemoveProduct(Product product)
 {
     Products.Remove(product);
 }