语言

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

特性

适用于