コード例 #1
0
        public OwnedQueryJetFixture()
        {
            _testStore = JetTestStore.Create("OwnedQueryTest");

            _options = new DbContextOptionsBuilder()
                       .UseJet(_testStore.ConnectionString, b => b.ApplyConfiguration())
                       .UseInternalServiceProvider(
                new ServiceCollection()
                .AddEntityFrameworkJet()
                .AddSingleton(TestModelSource.GetFactory(OnModelCreating))
                .AddSingleton <ILoggerFactory>(TestSqlLoggerFactory)
                .BuildServiceProvider(validateScopes: true))
                       .Options;

            using (var context = new DbContext(_options))
            {
                context.Database.EnsureCreated();

                AddTestData(context);
            }
        }
コード例 #2
0
 public DefaultValuesTest()
 {
     TestStore = JetTestStore.Create("DefaultValuesTest");
 }