語言

KeyExtensions.IsPrimaryKey(IKey) 方法

定義

回傳一個值,表示該鍵是否為主鍵。

public static bool IsPrimaryKey(this Microsoft.EntityFrameworkCore.Metadata.IKey key);
static member IsPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IKey -> bool
<Extension()>
Public Function IsPrimaryKey (key As IKey) As Boolean

參數

key
IKey

關鍵在於判斷它是否為主要。

傳回

true 如果金鑰是主鍵的話。

適用於