语言

RuntimeProperty.IReadOnlyProperty.IsKey 方法

定义

获取一个值,该值指示此属性是否用作主键或备用键(或复合主键或备用键的一部分)。

[System.Diagnostics.DebuggerStepThrough]
bool IReadOnlyProperty.IsKey();
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty.IsKey : unit -> bool
override this.Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty.IsKey : unit -> bool
Function IsKey () As Boolean Implements IReadOnlyProperty.IsKey

返回

true 如果属性用作键,则为 。否则 false为 。

实现

特性

适用于