public void CreatePurchasesItem(PurchasesItem item) { using (var ctx = new FreeSmokyMarketContext()) { ctx.PurchasesItems.Add(item); ctx.SaveChanges(); } }
public void DeletePurchasesItem(PurchasesItem item) { using (var ctx = new FreeSmokyMarketContext()) { ctx.PurchasesItems.Remove(item); ctx.SaveChanges(); } }
public void DeleteCategory(Category category) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Remove(category); ctx.SaveChanges(); } }
public void UpdateBasket(Basket basket) { using (var context = new FreeSmokyMarketContext()) { context.Baskets.Update(basket); context.SaveChanges(); } }
public void DeleteProduct(Product product) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Remove(product); ctx.SaveChanges(); } }
public void CreateCategory(Category category) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Add(category); ctx.SaveChanges(); } }
public void CreateProduct(Product product) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Add(product); ctx.SaveChanges(); } }
public void DeleteOrder(Order order) { using (var context = new FreeSmokyMarketContext()) { context.Orders.Remove(order); context.SaveChanges(); } }
public void CreateOrder(Order order) { using (var context = new FreeSmokyMarketContext()) { context.Orders.Add(order); context.SaveChanges(); } }
public void DeleteBrand(Brand brand) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Remove(brand); ctx.SaveChanges(); } }
public void UpdateBrand(Brand brand) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Update(brand); ctx.SaveChanges(); } }