EntityTypeExtensions.FindKey(IEntityType, IProperty) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定屬性上定義的主要或替代索引鍵。 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。