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 為 。

屬性

適用於