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

            DataAdapter = new EfCore.OeEfCoreDataAdapter <OrderContext>();
            EdmModel    = DataAdapter.BuildEdmModel();
        }
        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();
        }
Exemple #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();
        }