Share via


AddPrimaryKeyOperation.CreateFrom(IPrimaryKeyConstraint) Method

Definition

Creates a new AddPrimaryKeyOperation from the specified primary key.

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

Parameters

primaryKey
IPrimaryKeyConstraint

The primary key.

Returns

The operation.

Applies to