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

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

            var c = new Customer { Firstname = "John", Lastname = "Doe", Inserted = DateTime.Now };
            this.customerRepository.Add(c);

            this.customerRepository.UnitOfWork.CommitTransaction();
        }