語言

PropertyExtensions.IsKey(IProperty) 方法

定義

警告

Use IReadOnlyProperty.IsKey

會獲得一個值,表示該屬性是否被用作主鍵或備用鍵(或是複合主鍵或備用鍵的一部分)。

public static bool IsKey(this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
[System.Obsolete("Use IReadOnlyProperty.IsKey")]
public static bool IsKey(this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member IsKey : Microsoft.EntityFrameworkCore.Metadata.IProperty -> bool
[<System.Obsolete("Use IReadOnlyProperty.IsKey")>]
static member IsKey : Microsoft.EntityFrameworkCore.Metadata.IProperty -> bool
<Extension()>
Public Function IsKey (property As IProperty) As Boolean

參數

property
IProperty

該物業值得檢查。

傳回

true 若該性質被用作鍵,否則 false。

屬性

適用於