如何将其转换为LINQ OR EF

时间:2017-03-24 08:54:19

标签: entity-framework linq-to-sql

CFHTTPMessage undeclared type

有人可以将此转换为EF吗?

由于

1 个答案:

答案 0 :(得分:1)

请试试这个

var data= from EquipmentSerials in db.EquipmentSerials
      join Equipments in db.Discrepancy on EquipmentSerials.EquipmentID equals Equipments.ID
      join Discrepancy in db.Discrepancy on EquipmentSerials.ID equals Discrepancy.EquipmentSerialsID
      where Discrepancy.Symbol == "-"
      select new {
         EquipmentSerials.SerialNo,EquipmentSerials.IDNo,Equipments.Name,Equipments.TechOrder,Equipments.WorkUnitCode,Equipments.NationalStockNumber,Equipments.Manufacturer,Equipments.PartNumber,EquipmentSerials.ID,EquipmentSerials.EquipmentID,Discrepancy.Symbol};