예제 #1
0
        public DbFixture()
        {
            _databaseName  = OrderContext.GenerateDatabaseName();
            _dbDataAdapter = new OrderDbDataAdapter(_databaseName);
            _oeDataAdapter = new OrderOeDataAdapter(_databaseName);

            _edmModel = OeDataAdapter.BuildEdmModel();
        }
예제 #2
0
        public DbFixture(bool allowCache, bool useRelationalNulls)
        {
            _useRelationalNulls = useRelationalNulls;

            _databaseName = Model.OrderContext.GenerateDatabaseName();
            DbDataAdapter = new OrderDbDataAdapter(allowCache, useRelationalNulls, _databaseName);
            OeDataAdapter = new OrderOeDataAdapter(allowCache, useRelationalNulls, _databaseName);

            EdmModel = OeDataAdapter.BuildEdmModel();
        }
예제 #3
0
        public void FluentApi()
        {
            var      ethalonDataAdapter = new OeEfCoreDataAdapter <OrderContext>();
            EdmModel ethalonEdmModel    = ethalonDataAdapter.BuildEdmModel();
            String   ethalonSchema      = TestHelper.GetCsdlSchema(ethalonEdmModel);

            var      testDataAdapter = new OrderOeDataAdapter(false, false, null);
            EdmModel testEdmModel    = BuildEdmModelFromEf6Model(testDataAdapter);
            String   testSchema      = TestHelper.GetCsdlSchema(testEdmModel);

            Assert.Equal(ethalonSchema, testSchema);
        }
예제 #4
0
 public static EdmModel BuildEdmModel(this OrderOeDataAdapter dataAdapter)
 {
     return(dataAdapter.BuildEdmModelFromEfCorePgSqlModel("dbo"));
 }