src/EntityFramework/Migrations/Design/CSharpMigrationCodeGenerator.cs
/// <summary>
///     Generates code to perform a <see cref="DropIndexOperation" />.
/// </summary>
/// <param name="dropIndexOperation"> 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(DropIndexOperation dropIndexOperation, IndentedTextWriter writer)
        {
            Check.NotNull(dropIndexOperation, "dropIndexOperation");
            Check.NotNull(writer, "writer");
            writer.Write("DropIndex(");
            writer.Write(Quote(dropIndexOperation.Table));
            writer.Write(", ");
            if (!dropIndexOperation.HasDefaultName)
            {
                writer.Write(Quote(dropIndexOperation.Name));
            }
            else
            {
                writer.Write("new[] { ");
                writer.Write(dropIndexOperation.Columns.Join(Quote));
                writer.Write(" }");
            }
            writer.WriteLine(");");
        }
protected virtual void Generate ( DropIndexOperation dropIndexOperation , IndentedTextWriter writer ) { Check . NotNull ( dropIndexOperation , " " ) ; Check . NotNull ( writer , " " ) ; writer . Write ( " " ) ; writer . Write ( Quote ( dropIndexOperation . Table ) ) ; writer . Write ( " " ) ; if ( ! dropIndexOperation . HasDefaultName ) { writer . Write ( Quote ( dropIndexOperation . Name ) ) ; } else { writer . Write ( " " ) ; writer . Write ( dropIndexOperation . Columns . Join ( Quote ) ) ; writer . Write ( " " ) ; } writer . WriteLine ( " " ) ; }
Generates code to perform a .
Generates code to perform a .
dropIndexOperation
DropIndexOperation
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 .