KeyDiscoveryConvention.DiscoverKeyProperties 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| DiscoverKeyProperties(IConventionEntityType) |
回傳應該用於主鍵的屬性。 |
| DiscoverKeyProperties(IConventionEntityType, IEnumerable<IConventionProperty>) |
回傳應該用於主鍵的屬性。 |
DiscoverKeyProperties(IConventionEntityType)
回傳應該用於主鍵的屬性。
protected virtual System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? DiscoverKeyProperties(Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);
abstract member DiscoverKeyProperties : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
override this.DiscoverKeyProperties : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Protected Overridable Function DiscoverKeyProperties (entityType As IConventionEntityType) As List(Of IConventionProperty)
參數
- entityType
- IConventionEntityType
實體類型。
傳回
主鍵應該使用的屬性。
適用於
DiscoverKeyProperties(IConventionEntityType, IEnumerable<IConventionProperty>)
回傳應該用於主鍵的屬性。
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>
需要考慮的特性。
傳回
主鍵應該使用的屬性。