Esempio n. 1
0
 public void TearDown()
 {
     if ((context != null) && (((IObjectContextAdapter)context).ObjectContext.Connection.State == System.Data.ConnectionState.Open))
     {
         ((IObjectContextAdapter)context).ObjectContext.Connection.Close();
         context = null;
     }
 }
Esempio n. 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);
        }