public void UpdateCustomer(Customer customer) { using (var context = new OrderSystemContext()) { context.Entry(customer).State = EntityState.Modified; context.SaveChanges(); } }
public void UpdateCustomer(Customer customer) { _context.Entry(customer).State = EntityState.Modified; _context.SaveChanges(); }