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