src/Shared/EntityFramework/Migrations/Design/VisualBasicMigrationCodeGenerator.cs
/// <summary>
/// Generates code to perform an <see cref="AddForeignKeyOperation" /> as part of a <see cref="CreateTableOperation" />.
/// </summary>
/// <param name="addForeignKeyOperation"> The operation to generate code for. </param>
/// <param name="writer"> Text writer to add the generated code to. </param>
Generates code to perform an  as part of a .
Generates code to perform an as part of a .
protected virtual void GenerateInline(AddForeignKeyOperation addForeignKeyOperation, IndentedTextWriter writer)
        {
            Check.NotNull(addForeignKeyOperation, "addForeignKeyOperation");
            Check.NotNull(writer, "writer");
            writer.WriteLine(" _");
            writer.Write(".ForeignKey(" + Quote(addForeignKeyOperation.PrincipalTable) + ", ");
            Generate(addForeignKeyOperation.DependentColumns, writer);
            if (addForeignKeyOperation.CascadeDelete)
            {
                writer.Write(", cascadeDelete := True");
            }
            writer.Write(")");
        }
protected virtual void GenerateInline ( AddForeignKeyOperation addForeignKeyOperation , IndentedTextWriter writer ) { Check . NotNull ( addForeignKeyOperation , " " ) ; Check . NotNull ( writer , " " ) ; writer . WriteLine ( " " ) ; writer . Write ( " " + Quote ( addForeignKeyOperation . PrincipalTable ) + " " ) ; Generate ( addForeignKeyOperation . DependentColumns , writer ) ; if ( addForeignKeyOperation . CascadeDelete ) { writer . Write ( " " ) ; } writer . Write ( " " ) ; }
Generates code to perform an  as part of a .
Generates code to perform an as part of a .
addForeignKeyOperation
AddForeignKeyOperation
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 .