public Customer CreateCustomer(Customer customer)
 {
     var dc = new DataClassesDataContext(_connectionString);
     dc.Customers.InsertOnSubmit(customer);
     dc.SubmitChanges();
     return customer;
 }
 partial void DeleteCustomer(Customer instance);
 partial void UpdateCustomer(Customer instance);
 partial void InsertCustomer(Customer instance);
 public Customer UpdateCustomer(Customer customer)
 {
     var dc = new DataClassesDataContext(_connectionString);
     dc.Customers.Attach(customer, ReadCustomer(customer.CustomerID));
     dc.SubmitChanges();
     return customer;
 }
 public void DeleteCustomer(Customer customer)
 {
     var dc = new DataClassesDataContext(_connectionString);
     IQueryable<Customer> s = from e in dc.Customers
                              where e.CustomerID == customer.CustomerID
                              select e;
     dc.Customers.DeleteOnSubmit(s.First());
     dc.SubmitChanges();
 }