語言

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。

屬性

適用於