語言

NavigationPropertyNameForeignKeyDiscoveryConvention.MatchDependentKeyProperty 方法

定義

當覆寫時,回傳 true 應該 dependentProperty 是外鍵的一部分。

protected override bool MatchDependentKeyProperty(System.Data.Entity.Core.Metadata.Edm.AssociationType associationType, System.Data.Entity.Core.Metadata.Edm.AssociationEndMember dependentAssociationEnd, System.Data.Entity.Core.Metadata.Edm.EdmProperty dependentProperty, System.Data.Entity.Core.Metadata.Edm.EntityType principalEntityType, System.Data.Entity.Core.Metadata.Edm.EdmProperty principalKeyProperty);
override this.MatchDependentKeyProperty : System.Data.Entity.Core.Metadata.Edm.AssociationType * System.Data.Entity.Core.Metadata.Edm.AssociationEndMember * System.Data.Entity.Core.Metadata.Edm.EdmProperty * System.Data.Entity.Core.Metadata.Edm.EntityType * System.Data.Entity.Core.Metadata.Edm.EdmProperty -> bool

參數

associationType
AssociationType

正在設定的關聯類型。

dependentAssociationEnd
AssociationEndMember

依賴端。

dependentProperty
EdmProperty

受依存端的候選屬性。

principalEntityType
EntityType

主要終端實體類型。

principalKeyProperty
EdmProperty

主端的一個金鑰屬性,是外鍵的候選目標。

傳回

若 dependentProperty 應是外鍵的一部分,則為 true;否則,則為錯誤。

適用於