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

声明实体类型。

返回

相应的读取优化外键。

适用于