protected string GenerateTableVariable(string connStr, string variableName, string query) { SqlSchemaGenerator generator = new SqlSchemaGenerator(connStr); GenerateOptions options = new GenerateOptions { GenerateKeys = this.GeneratePrimaryKey, PrimaryKeyName = this.PrimaryKeyName }; return(generator.GenerateTableVariable(variableName, query, options)); }
protected override void ProcessRecord() { base.ProcessRecord(); SqlSchemaGenerator generator = new SqlSchemaGenerator(ConnectionString); GenerateOptions options = new GenerateOptions { GenerateKeys = this.GeneratePrimaryKey, PrimaryKeyName = this.PrimaryKeyName }; string output = generator.GenerateTableSql(OutputName, Query, options); WriteObject(output); }
public void SetUp() { _sqlSchemaGenerator = new SqlSchemaGenerator(); }