The column name is not valid. [ Node name (if any) = Extent1,Column name = marketplace ]
“marketplace”在代码中没有出现,IS是表中列的名称。
给出错误的SQl语句是:
SELECT [Extent1].[id] AS [id],
[Extent1].[marketplace] AS [marketplace],
[Extent1].[c1] AS [c1],
[Extent1].[name] AS [name],
[Extent1].[description] AS [description],
[Extent1].[c2] AS [c2],
[Extent1].[c3] AS [c3],
[Extent1].[c4] AS [c4],
并且无论订单如何,它都会在列市场上给出错误。
另外一个问题是,marketplace列必须是NOT NULL,但数据库中会满足此条件。
我使用“逆向工程师代码第一个命令”使用EF生成这个,并且在尝试将Entity类转换为列表时出现错误。
有人有什么想法吗?