提问人:shanthakumar n 提问时间:11/14/2023 最后编辑:shanthakumar n 更新时间:11/14/2023 访问量:46
如何在 Linq 中将 EXISTS 和 IN 与子查询一起使用
How to use EXISTS and IN with the subquery in Linq
问:
你能帮我把它转换为Linq吗,我们有EXISTS和IN用于子查询。
Select * From laqTasks where siteid=1
and Exists(Select 1 from laqTasks where room=1) and duty=1
and Room IN (SELECT roomid FROM laqPmsTasks WHERE siteid =2)
谢谢 N.ShanthaKumar。
答: 暂无答案
评论
Task
Room
Rooms
PmTask
Room
siteid
context.PmTasks.Where(t=>t.Room.SiteID==2)
laqTasks
Exists(Select 1 from laqTasks where room=1)
laqTasks