[英].Net Core 2.0 to 2.1: 'IMutableEntityType' does not contain a definition for 'Scaffolding'
We have a .Net Core 2.0 API using a psql database. 我们有一个使用psql数据库的.Net Core 2.0 API。 When updating to .Net Core 2.1, it stopped building and returned the following error:
更新到.Net Core 2.1时,它停止构建并返回以下错误:
'IMutableEntityType' does not contain a definition for 'Scaffolding' and no extension method 'Scaffolding' accepting a first argument of type 'IMutableEntityType' could be found (are you missing a using directive or an assembly reference?)
This extension methods was not intended for external use, but we need it to change entities schema at runtime. 此扩展方法不是供外部使用的,但我们需要它在运行时更改实体架构。
It's a one liner, but it took me some time to find that I had to change 这是一个班轮,但是我花了一些时间才发现我必须更换
builder.Entity(type).Metadata.Scaffolding();
to 至
builder.Entity(type).Metadata.Relational();
I hope it can help someone. 我希望它可以帮助某人。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.