protected virtual void Generate(CommentOperation operation, IndentedStringBuilder builder) { var cSharpHelper = Dependencies.CSharpHelper; string code(string s) => s == null ? "null" : cSharpHelper.Literal(s); builder.Append($".Comment(schema: {code(operation.Schema)}" + $", table: {code(operation.Table)}" + $", column: {code(operation.Column)}" + $", comment: {code(operation.Comment)}" + $")"); }
public static OperationBuilder <CommentOperation> Comment(this MigrationBuilder builder, string table, string comment, string schema = "dbo", string column = null) { var operation = new CommentOperation() { Table = table, Comment = comment, Schema = schema, Column = column, }; builder.Operations.Add(operation); return(new OperationBuilder <CommentOperation>(operation)); }