public void InsertCustomerUsingRepo() { var customerRepo = new DataRepository<CustomerTbl>(); CustomerTbl myCustomer = new CustomerTbl(); myCustomer.firstName = "Patrick"; myCustomer.lastName = "Camargo"; customerRepo.Insert(myCustomer); }
protected void SubmitBtn_Click(object sender, EventArgs e) { CustomerTbl myCustomer = new CustomerTbl(); myCustomer.firstName = this.FirstNameTextBox.Text; myCustomer.lastName = this.LastnameTextBox.Text; BusinessLayer customerMgr = new BusinessLayer(); customerMgr.addCustomer(myCustomer); }
public void UseFactoryToInsertCustomerTest() { CustomerTbl myCustomer = new CustomerTbl(); myCustomer.firstName = "John"; myCustomer.lastName = "Doe"; var customerRepo = Service.RepositoryFactory.Create("Customer"); customerRepo.Insert(myCustomer); customerRepo.Delete(myCustomer); }
public void addCustomer(CustomerTbl customer) { var customerRepo = Service.RepositoryFactory.Create("Customer"); customerRepo.Insert(customer); }