SQL语句转换成LINQ
select * from [BXTechnology].[dbo].[tb_News] where typeID IN(select ID from [BXTechnology].[dbo].[tb_Navigation] where parentID=5)
想把上面的SQL语句转换成LINQ语句,请问如何实现的?
------解决方案--------------------var query= tb_News.Where(n=>tb_Navigation.Where(v=>v.parentID==5).Select(v=>v.ID).Contains(n=>n.typeID));