Exemple #1
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());
        }