public void UpdateProduct(Product product) { using (var Context = new EcContext()) { Context.Entry(product).State = System.Data.Entity.EntityState.Modified; Context.SaveChanges(); } }
public void UpdateCategory(Category category) { using (var Context = new EcContext()) { Context.Entry(category).State = System.Data.Entity.EntityState.Modified; Context.SaveChanges(); } }