public void UpdateCategory(Category category)
 {
     using (var context = new ECPContext())
     {
         context.Entry(category).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public void UpdateProduct(Product product)
 {
     using (var context = new ECPContext())
     {
         context.Entry(product).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }