Esempio n. 1
0
 public tbl_customer CreateNewCustomer(tbl_customer cust)
 {
     using (var db = new KnockAroundDBContext())
     {
         var newcust = db.Customer.Add(cust);
         db.SaveChanges();
         return(newcust);
     }
 }
Esempio n. 2
0
 public void EditTheCustomer(tbl_customer cust)
 {
     using (var db = new KnockAroundDBContext())
     {
         //var editcust = db.Customer.Add(cust);
         db.Entry(cust).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }