예제 #1
0
        public DbFixtureInitDb(bool clear = false)
        {
            _clear = clear;

            DataAdapter = new EfCore.OeEfCoreDataAdapter <OrderContext>();
            EdmModel    = DataAdapter.BuildEdmModel();
        }
예제 #2
0
        public DbFixtureInitDb(bool clear = false)
        {
            _clear = clear;

            DataAdapter      = new EfCore.OeEfCoreDataAdapter <OrderContext>();
            MetadataProvider = new ModelBuilder.OeEdmModelMetadataProvider();
            var modelBuilder = new ModelBuilder.OeEdmModelBuilder(DataAdapter, MetadataProvider);

            EdmModel = modelBuilder.BuildEdmModel();
        }
예제 #3
0
        public DbFixtureInitDb(bool clear = false)
        {
            _clear = clear;

            DataAdapter = new EfCore.OeEfCoreDataAdapter <OrderContext>(OrderContextOptions.Create(true));
            var dbContext = (DbContext)DataAdapter.CreateDataContext();

            MetadataProvider = new EfCore.OeEfCoreEdmModelMetadataProvider(dbContext.Model);
            DataAdapter.CloseDataContext(dbContext);

            var modelBuilder = new ModelBuilder.OeEdmModelBuilder(DataAdapter, MetadataProvider);

            EdmModel = modelBuilder.BuildEdmModel();
        }