Bagikan melalui


CreateTableBuilder<TColumns>.ForeignKey Metode

Definisi

Overload

ForeignKey(String, Expression<Func<TColumns,Object>>, String, String, String, ReferentialAction, ReferentialAction)

Mengonfigurasi kunci asing kolom tunggal pada tabel.

ForeignKey(String, Expression<Func<TColumns,Object>>, String, String[], String, ReferentialAction, ReferentialAction)

Mengonfigurasi kunci asing beberapa kolom (komposit) pada tabel.

ForeignKey(String, Expression<Func<TColumns,Object>>, String, String, String, ReferentialAction, ReferentialAction)

Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs

Mengonfigurasi kunci asing kolom tunggal pada tabel.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation> ForeignKey (string name, System.Linq.Expressions.Expression<Func<TColumns,object>> column, string principalTable, string principalColumn, string principalSchema = default, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onUpdate = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onDelete = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation> ForeignKey (string name, System.Linq.Expressions.Expression<Func<TColumns,object>> column, string principalTable, string? principalColumn = default, string? principalSchema = default, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onUpdate = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onDelete = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction);
abstract member ForeignKey : string * System.Linq.Expressions.Expression<Func<'Columns, obj>> * string * string * string * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation>
override this.ForeignKey : string * System.Linq.Expressions.Expression<Func<'Columns, obj>> * string * string * string * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation>
Public Overridable Function ForeignKey (name As String, column As Expression(Of Func(Of TColumns, Object)), principalTable As String, principalColumn As String, Optional principalSchema As String = Nothing, Optional onUpdate As ReferentialAction = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction, Optional onDelete As ReferentialAction = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction) As OperationBuilder(Of AddForeignKeyOperation)
Public Overridable Function ForeignKey (name As String, column As Expression(Of Func(Of TColumns, Object)), principalTable As String, Optional principalColumn As String = Nothing, Optional principalSchema As String = Nothing, Optional onUpdate As ReferentialAction = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction, Optional onDelete As ReferentialAction = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction) As OperationBuilder(Of AddForeignKeyOperation)

Parameter

name
String

Nama batasan kunci asing.

column
Expression<Func<TColumns,Object>>

Kolom yang digunakan untuk kunci asing.

principalTable
String

Tabel di mana kunci asing dibatasi.

principalColumn
String

Kolom tempat kolom kunci asing dibatasi.

principalSchema
String

Skema yang berisi tabel di mana kunci asing dibatasi.

onUpdate
ReferentialAction

yang ReferentialAction digunakan untuk pembaruan.

onDelete
ReferentialAction

yang ReferentialAction digunakan untuk penghapusan.

Mengembalikan

Penyusun yang sama sehingga beberapa panggilan dapat dirangkai.

Berlaku untuk

ForeignKey(String, Expression<Func<TColumns,Object>>, String, String[], String, ReferentialAction, ReferentialAction)

Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs
Sumber:
CreateTableBuilder.cs

Mengonfigurasi kunci asing beberapa kolom (komposit) pada tabel.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation> ForeignKey (string name, System.Linq.Expressions.Expression<Func<TColumns,object>> columns, string principalTable, string[] principalColumns, string principalSchema = default, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onUpdate = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onDelete = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation> ForeignKey (string name, System.Linq.Expressions.Expression<Func<TColumns,object>> columns, string principalTable, string[]? principalColumns, string? principalSchema = default, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onUpdate = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction, Microsoft.EntityFrameworkCore.Migrations.ReferentialAction onDelete = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction);
abstract member ForeignKey : string * System.Linq.Expressions.Expression<Func<'Columns, obj>> * string * string[] * string * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation>
override this.ForeignKey : string * System.Linq.Expressions.Expression<Func<'Columns, obj>> * string * string[] * string * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction * Microsoft.EntityFrameworkCore.Migrations.ReferentialAction -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation>
Public Overridable Function ForeignKey (name As String, columns As Expression(Of Func(Of TColumns, Object)), principalTable As String, principalColumns As String(), Optional principalSchema As String = Nothing, Optional onUpdate As ReferentialAction = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction, Optional onDelete As ReferentialAction = Microsoft.EntityFrameworkCore.Migrations.ReferentialAction.NoAction) As OperationBuilder(Of AddForeignKeyOperation)

Parameter

name
String

Nama batasan kunci asing.

columns
Expression<Func<TColumns,Object>>

Kolom yang digunakan untuk kunci asing.

principalTable
String

Tabel di mana kunci asing dibatasi.

principalColumns
String[]

Kolom tempat kolom kunci asing dibatasi.

principalSchema
String

Skema yang berisi tabel di mana kunci asing dibatasi.

onUpdate
ReferentialAction

yang ReferentialAction digunakan untuk pembaruan.

onDelete
ReferentialAction

yang ReferentialAction digunakan untuk penghapusan.

Mengembalikan

Penyusun yang sama sehingga beberapa panggilan dapat dirangkai.

Berlaku untuk