상속: DbContext
예제 #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(new DataSeedingInitializer());
            context = new MyDbContext("DefaultDb");

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