Bagikan melalui


CreateTableBuilder<TColumns>.PrimaryKey Metode

Definisi

Mengonfigurasi kunci primer pada tabel.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation> PrimaryKey (string name, System.Linq.Expressions.Expression<Func<TColumns,object>> columns);
abstract member PrimaryKey : string * System.Linq.Expressions.Expression<Func<'Columns, obj>> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation>
override this.PrimaryKey : string * System.Linq.Expressions.Expression<Func<'Columns, obj>> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation>
Public Overridable Function PrimaryKey (name As String, columns As Expression(Of Func(Of TColumns, Object))) As OperationBuilder(Of AddPrimaryKeyOperation)

Parameter

name
String

Nama batasan kunci primer.

columns
Expression<Func<TColumns,Object>>

Kolom yang membentuk kunci primer.

Mengembalikan

Penyusun yang sama sehingga beberapa panggilan dapat dirangkai.

Berlaku untuk