예제 #1
0
        private void CreateCustomer()
        {
            var c = new Customer {
                Firstname = "John", Lastname = "Doe", Inserted = DateTime.Now
            };

            customerRepository.Add(c);

            customerRepository.UnitOfWork.SaveChanges();
        }
예제 #2
0
        private void CreateCustomer()
        {
            customerRepository.UnitOfWork.BeginTransaction();

            var c = new Customer {
                Firstname = "John", Lastname = "Doe", Inserted = DateTime.Now
            };

            customerRepository.Add(c);

            customerRepository.UnitOfWork.CommitTransaction();
        }