示例#1
0
 public void UpdateCategory(Category category)
 {
     using (var context = new MvcComContext())
     {
         context.Entry(category).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
示例#2
0
 public void UpdateProduct(Product product)
 {
     using (var context = new MvcComContext())
     {
         context.Entry(product).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }