Esempio n. 1
0
        public override String CreateScript()
        {
            StringBuilder script = new StringBuilder(String.Empty);

            script.AppendLine(SqlStatement.GetAnsiNullsStatemt(IsAnsiNullsOn));
            script.Append(SqlStatement.GetQuotedIdentifierStatemt(IsQuotedIdentifier));
            script.Append(SqlStatement.GO);
            script.Append(Text);
            script.AppendLine(SqlStatement.GO);
            return(script.ToString());
        }
Esempio n. 2
0
        public String HeaderCreateScript()
        {
            StringBuilder script = new StringBuilder(String.Empty, 500);

            script.AppendLine(SqlStatement.GetAnsiNullsStatemt(IsAnsiNullsOn));
            script.Append(SqlStatement.GetQuotedIdentifierStatemt(true));
            script.AppendLine(SqlStatement.GO);
            script.Append(SqlStatement.GetCreateStatemt("TABLE " + QualifiedName));

            //Columns definition
            script.AppendLine("(");
            script.AppendLine(String.Join(",\r\n", Columns.OrderBy(c => c.ColumnId).Select(c => c.CreateScript())));
            script.Append($")");
            script.AppendLine(SqlStatement.GO);

            return(script.ToString());
        }