【发布时间】:2022-06-24 04:45:50
【问题描述】:
我在尝试将 TableName 设置为变量时遇到问题。我目前正在尝试从 .NET Core 2.2 版本升级到 .NET 6,但出现此错误
Severity Code Description Project File Line Suppression State
Error CS1061 'IEntityType' does not contain a definition for 'Relational' and no accessible extension method 'Relational' accepting a first argument of type 'IEntityType' could be found (are you missing a using directive or an assembly reference?)
有问题的代码是这样的。
TableName = entry.Metadata.Relational().TableName;
【问题讨论】: