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

主键。

返回

操作。

适用于