CSharpSnapshotGenerator.GenerateForeignKey Method

Definition

Overloads

GenerateForeignKey(String, IForeignKey, IndentedStringBuilder)

Source:
CSharpSnapshotGenerator.cs
Source:
CSharpSnapshotGenerator.cs
Source:
CSharpSnapshotGenerator.cs
Source:
CSharpSnapshotGenerator.cs
Source:
CSharpSnapshotGenerator.cs

Generates code for an IForeignKey.

C#
protected virtual void GenerateForeignKey (string builderName, Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Infrastructure.IndentedStringBuilder stringBuilder);
C#
protected virtual void GenerateForeignKey (string entityTypeBuilderName, Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Infrastructure.IndentedStringBuilder stringBuilder);

Parameters

builderNameentityTypeBuilderName
String

The name of the builder variable.

foreignKey
IForeignKey

The foreign key.

stringBuilder
IndentedStringBuilder

The builder code is added to.

Applies to

Entity Framework Core 9.0 i druge verzije
Proizvod Verzije
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0

GenerateForeignKey(IForeignKey, IndentedStringBuilder)

C#
protected virtual void GenerateForeignKey (Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Internal.IndentedStringBuilder stringBuilder);

Parameters

foreignKey
IForeignKey
stringBuilder
Microsoft.EntityFrameworkCore.Internal.IndentedStringBuilder

Applies to

Entity Framework Core 1.1 i Entity Framework Core 1.0
Proizvod Verzije
Entity Framework Core 1.0, 1.1

GenerateForeignKey(String, IForeignKey, IndentedStringBuilder)

Source:
CSharpSnapshotGenerator.cs
Source:
CSharpSnapshotGenerator.cs
Source:
CSharpSnapshotGenerator.cs
Source:
CSharpSnapshotGenerator.cs

Generates code for an IForeignKey.

C#
protected virtual void GenerateForeignKey (string builderName, Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Internal.IndentedStringBuilder stringBuilder);

Parameters

builderName
String

The name of the builder variable.

foreignKey
IForeignKey

The foreign key.

stringBuilder
Microsoft.EntityFrameworkCore.Internal.IndentedStringBuilder

The builder code is added to.

Applies to

Entity Framework Core 3.1 i druge verzije
Proizvod Verzije
Entity Framework Core 2.0, 2.1, 2.2, 3.0, 3.1