Beispiel #1
0
        public void Bim(
            [Option(LongName = "connectionString", ShortName = "c")]
            string connectionString,
            [Option(LongName = "sqlType", ShortName = "t")]
            string sqlType,
            [Option(LongName = "databaseName", ShortName = "b")]
            string databaseName,
            [Option(LongName = "patternFileName", ShortName = "p")]
            string patternFileName)
        {
            var version = SqlEngineVersions.GetVersion(sqlType);

            var connString = new NamedConnectionString(
                version.GetType().Name,
                version.ProviderName,
                connectionString,
                version.VersionString);

            var context = CreateContext(version);

            var ddlReader = DataDefinitionReaderFactory.CreateDataDefinitionReader(connString, context, null);

            var dd = ddlReader.GetDatabaseDefinition();

            var documenterContext = CreateDocumenterContext(context, patternFileName);

            var generator = new BimGenerator(documenterContext, version, databaseName);

            generator.Generate(dd);
        }
Beispiel #2
0
        public void GeneratorForeignKeyComposite2(SqlEngineVersion version)
        {
            var db        = new ForeignKeyCompositeSetForeignKeyTo();
            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer()), version, "ForeignKeyCompositeSetForeignKeyTo");

            generator.Generate(db);
        }
Beispiel #3
0
        public void GeneratorTestDatabaseFks(SqlEngineVersion version)
        {
            var db = new TestDatabaseFks();

            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer()), version, "TestDatabaseFks");

            generator.Generate(db);
        }
Beispiel #4
0
        public void GeneratorForeignKeyComposite1(SqlEngineVersion version)
        {
            var db = new ForeignKeyComposite();

            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version), version, "ForeignKeyComposite");

            generator.Generate(db);
        }
Beispiel #5
0
        public void GeneratorTabularRelation(SqlEngineVersion version)
        {
            var db = new TabularRelation();

            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version), version, "TabularRelation");

            generator.Generate(db);
        }