Example #1
0
        public UnitOfWork()
        {
            _context = new DataContext();

            People = new PersonRepository(_context);
            Payments = new PaymentRepository(_context);
            PaymentDetails = new PaymentDetailRepository(_context);
        }
Example #2
0
        public virtual void TestInitialize()
        {
            using (var db = new DataContext())
            {
                if (db.Database.Exists())
                    db.Database.Delete();

                db.Database.Create();
            }
        }
Example #3
0
 public virtual void TestCleanup()
 {
     using (var db = new DataContext())
         if (db.Database.Exists())
             db.Database.Delete();
 }