예제 #1
0
 public void AddCustomer(Customer customer)
 {
     using (var _db = new CRUDEFEntities()) {
         _db.Customers.Add(customer);
         _db.SaveChanges();
     }
 }
예제 #2
0
 public void UpdateCustomer(Customer customer)
 {
     using (var _db = new CRUDEFEntities()) {
         var customer_temp = _db.Customers.SingleOrDefault(c => c.CustomerID == customer.CustomerID);
         _db.Entry(customer_temp).CurrentValues.SetValues(customer);
         _db.SaveChanges();
     }
 }
예제 #3
0
 public void UpdateCustomer(Customer customer)
 {
     DAOCustomer.GetInstance().UpdateCustomer(customer);
 }
예제 #4
0
 public void AddCustomer(Customer customer)
 {
     DAOCustomer.GetInstance().AddCustomer(customer);
 }