共用方式為


IdKeyDiscoveryConvention 類別

定義

偵測主索引鍵屬性的慣例。 依優先順序辨識的命名模式如下:

  1. 'Id'
  2. [類型名稱]識別碼主鍵偵測不區分大小寫。
public class IdKeyDiscoveryConvention : System.Data.Entity.ModelConfiguration.Conventions.KeyDiscoveryConvention
type IdKeyDiscoveryConvention = class
    inherit KeyDiscoveryConvention
Public Class IdKeyDiscoveryConvention
Inherits KeyDiscoveryConvention
繼承
IdKeyDiscoveryConvention
繼承
IdKeyDiscoveryConvention

建構函式

IdKeyDiscoveryConvention()

偵測主索引鍵屬性的慣例。 依優先順序辨識的命名模式如下:

  1. 'Id'
  2. [類型名稱]識別碼主鍵偵測不區分大小寫。

方法

Apply(EntityType, DbModel)

將此慣例套用至模型中的專案。

(繼承來源 KeyDiscoveryConvention)
MatchKeyProperty(EntityType, IEnumerable<EdmProperty>)

覆寫時會傳回屬性子集,這些屬性將會是主鍵的一部分。

MatchKeyProperty(EntityType, IEnumerable<EdmProperty>)

覆寫時會傳回屬性子集,這些屬性將會是主鍵的一部分。

(繼承來源 KeyDiscoveryConvention)

適用於