Example #1
0
 public void DeleteProduct(Product product)
 {
     using (var ctx = new FreeSmokyMarketContext())
     {
         ctx.Remove(product);
         ctx.SaveChanges();
     }
 }
 public void DeleteCategory(Category category)
 {
     using (var ctx = new FreeSmokyMarketContext())
     {
         ctx.Remove(category);
         ctx.SaveChanges();
     }
 }
 public void DeleteBrand(Brand brand)
 {
     using (var ctx = new FreeSmokyMarketContext())
     {
         ctx.Remove(brand);
         ctx.SaveChanges();
     }
 }