public void DeleteProductCategory(int productCategoryId)
 {
     try
     {
         var productCategory = _storeDbContext.ProductCategory.Get(productCategoryId);
         _storeDbContext.ProductCategory.Remove(productCategory);
         _storeDbContext.Complete();
     }
     catch { throw; }
 }
Пример #2
0
 public IOrder AddOrder(Order order)
 {
     try
     {
         _storeDbContext.Orders.Add(order);
         _storeDbContext.Complete();
         return(order);
     }
     catch
     {
         return(null);
     }
 }
Пример #3
0
        public IProduct AddProduct(Product product)
        {
            try
            {
                _storeDbContext.Products.Add(product);

                _storeDbContext.Complete();

                return(product);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }