src/EntityFramework/Migrations/Design/CSharpMigrationCodeGenerator.cs
/// <summary>
/// Generates code to perform a <see cref="DropColumnOperation" />.
/// </summary>
/// <param name="dropColumnOperation"> The operation to generate code for. </param>
/// <param name="writer"> Text writer to add the generated code to. </param>
Generates code to perform a .
Generates code to perform a .
protected virtual void Generate(DropColumnOperation dropColumnOperation, IndentedTextWriter writer)
        {
            Check.NotNull(dropColumnOperation, "dropColumnOperation");
            Check.NotNull(writer, "writer");
            writer.Write("DropColumn(");
            writer.Write(Quote(dropColumnOperation.Table));
            writer.Write(", ");
            writer.Write(Quote(dropColumnOperation.Name));
            if (dropColumnOperation.RemovedAnnotations.Any())
            {
                writer.Indent++;
                writer.WriteLine(",");
                writer.Write("removedAnnotations: ");
                GenerateAnnotations(dropColumnOperation.RemovedAnnotations, writer);
                writer.Indent--;
            }
            writer.WriteLine(");");
        }
protected virtual void Generate ( DropColumnOperation dropColumnOperation , IndentedTextWriter writer ) { Check . NotNull ( dropColumnOperation , " " ) ; Check . NotNull ( writer , " " ) ; writer . Write ( " " ) ; writer . Write ( Quote ( dropColumnOperation . Table ) ) ; writer . Write ( " " ) ; writer . Write ( Quote ( dropColumnOperation . Name ) ) ; if ( dropColumnOperation . RemovedAnnotations . Any ( ) ) { writer . Indent ++ ; writer . WriteLine ( " " ) ; writer . Write ( " " ) ; GenerateAnnotations ( dropColumnOperation . RemovedAnnotations , writer ) ; writer . Indent -- ; } writer . WriteLine ( " " ) ; }
Generates code to perform a .
Generates code to perform a .
dropColumnOperation
DropColumnOperation
The operation to generate code for.
The operation to generate code for .
writer
IndentedTextWriter
Text writer to add the generated code to.
Text writer to add the generated code to .