次の方法で共有


EntityTypeExtensions.FindKey(IEntityType, IProperty) メソッド

定義

指定されたプロパティで定義されている主キーまたは代替キーを取得します。 指定されたプロパティに null 対してキーが定義されていない場合は を返します。

public static Microsoft.EntityFrameworkCore.Metadata.IKey FindKey (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member FindKey : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.IKey
<Extension()>
Public Function FindKey (entityType As IEntityType, property As IProperty) As IKey

パラメーター

entityType
IEntityType

エンティティの型。

property
IProperty

キーが定義されているプロパティ。

戻り値

キー。定義されていない場合は null。

適用対象