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