Example #1
0
        public Product AddProduct(Product product)
        {
            try {
                db.ProductRepository.Insert(product);
                db.Save();

                return product;
            }
            catch (Exception ex)
            {
                return null;
            }
        }
Example #2
0
 public virtual void AddProduct(Product product)
 {
     product.Categories.Add(this);
     Products.Add(product);
 }
Example #3
0
        public Boolean UpdateProduct(string ProductId, Product product)
        {
            try
            {
                db.ProductRepository.Update(product);
                db.Save();

                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
Example #4
0
 public virtual void AddProduct(Product product)
 {
     product.Stores.Add(this);
     Products.Add(product);
 }