예제 #1
0
 public void TearDown()
 {
     if ((context != null) && (((IObjectContextAdapter)context).ObjectContext.Connection.State == System.Data.ConnectionState.Open))
     {
         ((IObjectContextAdapter)context).ObjectContext.Connection.Close();
         context = null;
     }
 }
예제 #2
0
        public void SetUp()
        {
            Database.SetInitializer<MyDbContext>(new DataSeedingInitializer());
            context = new MyDbContext("DefaultDb");

            customerRepository = new QV.Tests.Data.Lab.CustomerRepository(context);
            repository = new QV.Data.EntityFramework.Lab.GenericRepository(context);
        }