有人可以帮助我以正确的方式将此查询转换为 Linq 到实体查询。我对 Linq 还很陌生,想正确地编写这些查询。对于我对 UNION 和其中的子查询所做的事情,这是一个相当复杂的问题
SELECT pf.FileID, pf.ServerName, pf.MigrationType
FROM pOrders pf
WHERE pf.FileID IN (select GCMFileID FROM Signals
where SignalFileID = " + FileID + ")
UNION
SELECT pf.FileID, pf.ServerName, pf.MigrationType
FROM pOrders pf
WHERE pf.FileID = " + FileID + "
order by pf.MigrationType desc