共用方式為


RuntimeModelConvention.GetForeignKey(IForeignKey, RuntimeEntityType) 方法

定義

取得讀取優化模型中對應的外鍵。

protected virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey GetForeignKey (Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Metadata.RuntimeEntityType entityType);
abstract member GetForeignKey : Microsoft.EntityFrameworkCore.Metadata.IForeignKey * Microsoft.EntityFrameworkCore.Metadata.RuntimeEntityType -> Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey
override this.GetForeignKey : Microsoft.EntityFrameworkCore.Metadata.IForeignKey * Microsoft.EntityFrameworkCore.Metadata.RuntimeEntityType -> Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey
Protected Overridable Function GetForeignKey (foreignKey As IForeignKey, entityType As RuntimeEntityType) As RuntimeForeignKey

參數

foreignKey
IForeignKey

原始外鍵。

entityType
RuntimeEntityType

宣告實體類型。

傳回

對應的讀取優化外鍵。

適用於