Esempio n. 1
0
        public void InsertCustomerUsingRepo()
        {
            var customerRepo = new DataRepository<CustomerTbl>();

            CustomerTbl myCustomer = new CustomerTbl();
            myCustomer.firstName = "Patrick";
            myCustomer.lastName = "Camargo";

            customerRepo.Insert(myCustomer);
        }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public void addCustomer(CustomerTbl customer)
        {
            var customerRepo = Service.RepositoryFactory.Create("Customer");

            customerRepo.Insert(customer);
        }