使用linq从实体框架核心获取{“ error”:“ Sql Tree中的空TypeMapping”}}>

问题描述 投票:0回答:1

我有这个linq select语句,并且我得到了这个错误{“ error”:“ SQL树中的Null TypeMapping”}。

请将代码放在下面,但是有没有办法获取有关问题所在的更多信息?如果您需要这些实体,请让我知道,我会复制它们。

问候

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
                        };

我有这个linq select语句,并且我得到了这个错误{“ error”:“ SQL树中的Null TypeMapping”}。麻烦将代码放在下面,但是有没有办法获取有关此问题的更多信息?如果...

asp.net-core entity-framework-core linq-to-entities
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.