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); }
public void GeneratorForeignKeyComposite2(SqlEngineVersion version) { var db = new ForeignKeyCompositeSetForeignKeyTo(); var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer()), version, "ForeignKeyCompositeSetForeignKeyTo"); generator.Generate(db); }
public void GeneratorTestDatabaseFks(SqlEngineVersion version) { var db = new TestDatabaseFks(); var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer()), version, "TestDatabaseFks"); generator.Generate(db); }
public void GeneratorForeignKeyComposite1(SqlEngineVersion version) { var db = new ForeignKeyComposite(); var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version), version, "ForeignKeyComposite"); generator.Generate(db); }
public void GeneratorTabularRelation(SqlEngineVersion version) { var db = new TabularRelation(); var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version), version, "TabularRelation"); generator.Generate(db); }