示例#1
0
 IDbContext IDatabaseFactory.Get()
 {
     if (_dataContext == null)
     {
         EffortConnection InMemoryconnection = DbConnectionFactory.CreateTransient();
         _dataContext = UnitTestContext.Create(InMemoryconnection);
         _dataContext.Database.Initialize(false);
         return((IDbContext)_dataContext);
     }
     else
     {
         return((IDbContext)_dataContext);
     }
 }