共用方式為


AddPrimaryKeyOperation.CreateFrom(IPrimaryKeyConstraint) 方法

定義

從指定的主鍵建立新的 AddPrimaryKeyOperation

public static Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation CreateFrom (Microsoft.EntityFrameworkCore.Metadata.IPrimaryKeyConstraint primaryKey);
static member CreateFrom : Microsoft.EntityFrameworkCore.Metadata.IPrimaryKeyConstraint -> Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation
Public Shared Function CreateFrom (primaryKey As IPrimaryKeyConstraint) As AddPrimaryKeyOperation

參數

primaryKey
IPrimaryKeyConstraint

主鍵。

傳回

作業。

適用於