public void InsertOrUpdate(Customer customer) { if (customer.State == State.Added) { _context.Customers.Add(customer); } else { _context.Customers.Add(customer); _context.ApplyStateChanges(); } }
public void InsertOrUpdate(Customer customer) { if (customer.State == State.Added) { _context.Customers.Add(customer); } else { _context.Customers.Add(customer); _context.ApplyStateChanges(); } }