public override string GetInsertScript(HistoryRow row)
        {
            Check.NotNull(row, nameof(row));

            return new StringBuilder().Append("INSERT INTO ")
                .Append(Sql.DelimitIdentifier(TableName, TableSchema))
                .Append(" (")
                .Append(Sql.DelimitIdentifier(MigrationIdColumnName))
                .Append(", ")
                .Append(Sql.DelimitIdentifier(ProductVersionColumnName))
                .AppendLine(")")
                .Append("VALUES (N'")
                .Append(Sql.EscapeLiteral(row.MigrationId))
                .Append("', N'")
                .Append(Sql.EscapeLiteral(row.ProductVersion))
                .Append("');")
                .ToString();
        }
예제 #2
0
        public virtual string GetInsertScript([NotNull] HistoryRow row)
        {
            Check.NotNull(row, nameof(row));

            return(new StringBuilder().Append("INSERT INTO ")
                   .Append(SqlGenerator.DelimitIdentifier(TableName, TableSchema))
                   .Append(" (")
                   .Append(SqlGenerator.DelimitIdentifier(MigrationIdColumnName))
                   .Append(", ")
                   .Append(SqlGenerator.DelimitIdentifier(ProductVersionColumnName))
                   .AppendLine(")")
                   .Append("VALUES ('")
                   .Append(SqlGenerator.EscapeLiteral(row.MigrationId))
                   .Append("', '")
                   .Append(SqlGenerator.EscapeLiteral(row.ProductVersion))
                   .AppendLine("');")
                   .ToString());
        }