コード例 #1
0
 public void UpdateProduct(Product product)
 {
     using (var Context = new EcContext())
     {
         Context.Entry(product).State = System.Data.Entity.EntityState.Modified;
         Context.SaveChanges();
     }
 }
コード例 #2
0
 public void UpdateCategory(Category category)
 {
     using (var Context = new EcContext())
     {
         Context.Entry(category).State = System.Data.Entity.EntityState.Modified;
         Context.SaveChanges();
     }
 }