我在 .net5 Web api 应用程序中使用适用于 Visual Studio 2019 的 EF Core Power Tools。我正在尝试对我们的数据库进行逆向工程(MS SQL Server v17.9.1)。我正在使用 NuGet 包 EFCore.SqlServer (5.0.11) 和 EFCore.Tools (5.0.11)
每个表中有很多很多列我们没有使用(自动生成)。尝试使用排除列时出现此错误:
System.InvalidOperationException: The property 'OrderNumber' cannot be added to the type 'SalesOrderBase' because no property type was specified and there is no corresponding CLR property or field. To add a shadow state property, the property type must be specified.
OrderNumber 是我排除的列之一。它不用于任何键或索引。 表定义的屏幕截图
我看到this thread about a similar issue,但这似乎与PostgresSQL有关,而且是4个月前。
我可以处理所有列,但它会极大地混淆代码库。