public void DeleteProductCategory(int productCategoryId) { try { var productCategory = _storeDbContext.ProductCategory.Get(productCategoryId); _storeDbContext.ProductCategory.Remove(productCategory); _storeDbContext.Complete(); } catch { throw; } }
public IOrder AddOrder(Order order) { try { _storeDbContext.Orders.Add(order); _storeDbContext.Complete(); return(order); } catch { return(null); } }
public IProduct AddProduct(Product product) { try { _storeDbContext.Products.Add(product); _storeDbContext.Complete(); return(product); } catch (Exception ex) { return(null); } }