Esempio n. 1
0
        public void FluentApi()
        {
            var      ethalonDataAdapter = new OrderDbDataAdapter(false, false, null);
            EdmModel ethalonEdmModel    = ethalonDataAdapter.BuildEdmModel();
            String   ethalonSchema      = TestHelper.GetCsdlSchema(ethalonEdmModel);

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

            Assert.Equal(ethalonSchema, testSchema);
        }
Esempio n. 2
0
        public void FluentApi()
        {
            var      ethalonDataAdapter = new OrderDbDataAdapter(OrderContext.GenerateDatabaseName());
            EdmModel ethalonEdmModel    = ethalonDataAdapter.BuildEdmModel();
            String   ethalonSchema      = TestHelper.GetCsdlSchema(ethalonEdmModel);

            var      testDataAdapter = new OrderDbDataAdapter(OrderContext.GenerateDatabaseName());
            EdmModel testEdmModel    = testDataAdapter.BuildEdmModelFromEfCoreModel();
            String   testSchema      = TestHelper.GetCsdlSchema(testEdmModel);

            Assert.Equal(ethalonSchema, testSchema);
        }
        public void FluentApi()
        {
            var      ethalonDataAdapter = new OeEfCoreDataAdapter <OrderContext>();
            EdmModel ethalonEdmModel    = ethalonDataAdapter.BuildEdmModel();
            String   ethalonSchema      = TestHelper.GetCsdlSchema(ethalonEdmModel);

            var      testDataAdapter = new OeEf6DataAdapter <OrderEf6Context>();
            EdmModel testEdmModel    = BuildEdmModelFromEf6Model(testDataAdapter);
            String   testSchema      = TestHelper.GetCsdlSchema(testEdmModel);

            Assert.Equal(ethalonSchema, testSchema);
        }
        public void FluentApi()
        {
            var      ethalonDataAdapter = new OrderDataAdapter(false, false, null);
            EdmModel ethalonEdmModel    = ethalonDataAdapter.BuildEdmModel();
            String   ethalonSchema      = TestHelper.GetCsdlSchema(ethalonEdmModel);

            if (ethalonSchema == null)
            {
                throw new InvalidOperationException("Invalid ethalon schema");
            }

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

            if (testSchema == null)
            {
                throw new InvalidOperationException("Invalid test schema");
            }

            Assert.Equal(ethalonSchema, testSchema);
        }
        public void FluentApi()
        {
            var      ethalonDataAdapter = new OeEfCoreDataAdapter <OrderContext>(OrderContextOptions.Create(true));
            EdmModel ethalonEdmModel    = ethalonDataAdapter.BuildEdmModel();
            String   ethalonSchema      = TestHelper.GetCsdlSchema(ethalonEdmModel);

            if (ethalonSchema == null)
            {
                throw new InvalidOperationException("Invalid ethalon schema");
            }

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

            if (testSchema == null)
            {
                throw new InvalidOperationException("Invalid test schema");
            }

            String fixTestSchema = FixNamesInSchema(testSchema);

            Assert.Equal(ethalonSchema, fixTestSchema);
        }