Asp.net core 使用linq从实体框架核心获取{“error”:“Sql树中的Null TypeMapping”}
我有这个linq select语句,我得到了这个错误{“error”:“Sql树中的Null TypeMapping”} 我会把代码放在下面,但有没有办法获得更多关于问题所在的信息? 如果您需要实体,请告诉我,我会复制它们 问候Asp.net core 使用linq从实体框架核心获取{“error”:“Sql树中的Null TypeMapping”},asp.net-core,entity-framework-core,linq-to-entities,Asp.net Core,Entity Framework Core,Linq To Entities,我有这个linq select语句,我得到了这个错误{“error”:“Sql树中的Null TypeMapping”} 我会把代码放在下面,但有没有办法获得更多关于问题所在的信息? 如果您需要实体,请告诉我,我会复制它们 问候 var query = from o in _orderDataDbContext.tblSellFlangeOrders join od in _orderDataDbContext.tblSellFlangeOrderDetails
var query = from o in _orderDataDbContext.tblSellFlangeOrders
join od in _orderDataDbContext.tblSellFlangeOrderDetails
on (int?)o.Id equals od.SellFlangeOrderId
join t in _orderDataDbContext.tblTypes
on od.TypeId equals (int?)t.Id
join l in _orderDataDbContext.VLegendeFlangeLengths
on od.LengthId equals (int?)l.Id
join g in _orderDataDbContext.VLegendeGrades
on od.GradeId equals (int?)g.Id
where o.Id == request._flangeOrderID
select new FlangeOrderDetailByPoCodeDto
{
SellFlangeOrderID = o.Id,
DetailID = od.Id,
Price = od.Price1000,
BF = od.Bf,
TypeID = t.Id,
Type = t.Inches1 + "x" + t.Inches2,
LengthID = l.Id,
Length = l.Length + "'" + l.OverLength + "\"",
GradeID = g.Id,
Grade = g.Grade
};
可能的副本I未能再现该问题。如果您希望社区审查和调试代码,请显示相关实体和DbContext。这是否回答了您的问题?