public void UpdateCategories(Categories categories) { using (AccountContext db = new AccountContext()) { db.Entry(categories).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }
public void UpdateChocolate(Chocolate chocolate) { using (AccountContext db = new AccountContext()) { db.Entry(chocolate).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }