I tried to convert this sql query
Select * from ( select SenDa.*,Prod.ProductKHK,FCod.FailCodeDesc from databa.dbo.SensorData as SenDa left join Products as Prod on SenDa.ProductID = Prod.ProductID left join FailCodes as FCod on SenDa.FailCode = FCod.FailCode and (FCod.ProdLineID =0 or FCod.ProdLineID = FCod.ProdLineID) ) as SenDa to sql Linq so :
var SensDatJoinFail = (from SensDat in Jas_en.SenDatas join Prod in Jas_en.Products on SensDat.ProductID equals Prod.ProductID join FCod in Jas_en.FailCodes on SensDat.FailCode equals FCod.FailCode1 where FCod.ProdLineID == 0 || FCod.ProdLineID == FCod.ProdLineID select new { Serial_No = SensDat.Serial_No, OrderID = SensDat.OrderID, Artikelnummer = Prod.ProductKHK, StartProcTime = SensDat.StartProcTime, EndProcTime = SensDat.EndProcTime, Packaged = SensDat.Packaged, Labeled = SensDat.Labeled, Reworked = SensDat.Reworked, LastStation = SensDat.LastStation, FailCode = SensDat.FailCode, FailCodeDesc = FCod.FailCodeDesc, }); but I get difference in the result of query in rows count
I don't know , where is the problem ?