共用方式為


KeyDiscoveryConvention.DiscoverKeyProperties 方法

定義

傳回應該用於主鍵的屬性。

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> DiscoverKeyProperties (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> candidateProperties);
static member DiscoverKeyProperties : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * seq<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> -> seq<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Public Shared Function DiscoverKeyProperties (entityType As IConventionEntityType, candidateProperties As IEnumerable(Of IConventionProperty)) As IEnumerable(Of IConventionProperty)

參數

entityType
IConventionEntityType

實體類型。

candidateProperties
IEnumerable<IConventionProperty>

要考慮的屬性。

傳回

應該用於主鍵的屬性。

適用於