Beispiel #1
0
        public void DeleteMe()
        {
            var ctx  = new BaltaDataContext();
            var repo = new CustomerRepository(ctx);

            Assert.AreEqual(repo.CheckDocument("99999999999"), true);
        }
Beispiel #2
0
        public void DeleteMeToo()
        {
            var ctx  = new BaltaDataContext();
            var repo = new CustomerRepository(ctx);

            // Recupera os produtos do banco
            var name     = new Name("André", "Baltieri");
            var document = new Document("46718115533");
            var email    = new Email("*****@*****.**");
            var customer = new Customer(name, document, email, "551999876542");
            var address  = new Address("Rua", "1", "N/A", "Meu Bairro", "Piracicaba", "SP", "BR", "13400000", EAddressType.Billing);
            var address2 = new Address("Rua2", "2", "N/A", "Meu Bairro", "Piracicaba", "SP", "BR", "13400000", EAddressType.Shipping);

            customer.AddAddress(address);
            customer.AddAddress(address2);

            repo.Save(customer);
        }
Beispiel #3
0
 public CustomerRepository(BaltaDataContext context)
 {
     _context = context;
 }
Beispiel #4
0
 public UserRepository(BaltaDataContext context)
 {
     _context = context;
 }
Beispiel #5
0
 public UnitOfWork(BaltaDataContext context)
 {
     _context = context;
 }
 public CustomerRepository(BaltaDataContext baltaDataContext)
 {
     _baltaDataContext = baltaDataContext;
 }