public void Update(User user) { using (var db = new TruckSaleDb()) { db.Entry(user).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }
public void Update(Product product) { using (var db = new TruckSaleDb()) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); } }