Ejemplo n.º 1
0
        private void AddOrUpdateCustomerTest()
        {
            var customers = _test.GetCustomersByFirstName("李");

            foreach (var c in customers)
            {
                c.LastName = "Jianlong";
            }
            var c1 = new Customer {
                FirstName = "Jackie", LastName = "Jianlong"
            };
            var c2 = new Customer {
                FirstName = "Jackie", LastName = "Jianlong"
            };

            customers.Add(c1);
            customers.Add(c2);
            _testAUD.AddOrUpdateCustomer(customers);
            "==>AddOrUpdateCustomerTest:".Output(customers);
            "========================".Output();
            var list = _test.GetCustomersByFirstName("Jackie");

            "==>Jackie first names:".Output(list);
        }
Ejemplo n.º 2
0
        public void SaveOrUpdateCustomersTransactionTest()
        {
            var customers = _test.GetCustomersByFirstName("李");

            foreach (var c in customers)
            {
                c.LastName = "Jianlong2";
            }
            var c1 = new Customer {
                FirstName = "Jackie55", LastName = "Lee"
            };

            customers.Add(c1);
            _testTrans.SaveOrUpdateCustomersTransaction(customers);
            "==>SaveOrUpdateCustomersTransactionTest:".Output();
        }