src/EntityFramework/Migrations/Design/CSharpMigrationCodeGenerator.cs
/// <summary>
/// Generates code to perform a <see cref="DropPrimaryKeyOperation" />.
/// </summary>
/// <param name="dropPrimaryKeyOperation"> 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(DropPrimaryKeyOperation dropPrimaryKeyOperation, IndentedTextWriter writer)
        {
            Check.NotNull(dropPrimaryKeyOperation, "dropPrimaryKeyOperation");
            Check.NotNull(writer, "writer");
            writer.Write("DropPrimaryKey(");
            writer.Write(Quote(dropPrimaryKeyOperation.Table));
            if (!dropPrimaryKeyOperation.HasDefaultName)
            {
                writer.Write(", name: ");
                writer.Write(Quote(dropPrimaryKeyOperation.Name));
            }
            writer.WriteLine(");");
        }
protected virtual void Generate ( DropPrimaryKeyOperation dropPrimaryKeyOperation , IndentedTextWriter writer ) { Check . NotNull ( dropPrimaryKeyOperation , " " ) ; Check . NotNull ( writer , " " ) ; writer . Write ( " " ) ; writer . Write ( Quote ( dropPrimaryKeyOperation . Table ) ) ; if ( ! dropPrimaryKeyOperation . HasDefaultName ) { writer . Write ( " " ) ; writer . Write ( Quote ( dropPrimaryKeyOperation . Name ) ) ; } writer . WriteLine ( " " ) ; }
Generates code to perform a .
Generates code to perform a .
dropPrimaryKeyOperation
DropPrimaryKeyOperation
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 .