PropertyExtensions.IsForeignKey(IProperty) 方法

定義

警告

Use IReadOnlyProperty.IsForeignKey

取得值,指出這個屬性是否做為外鍵 (或複合外鍵) 的一部分。

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

參數

property
IProperty

要檢查的屬性。

傳回

true 如果屬性做為外鍵使用,則為 ,否則 false 為 。

屬性

適用於