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