我需要得到這個linq查詢的sql查詢。我使用linqpad。 我用Id
變量調用。當執行LINQ查詢得到錯誤linqpad中linq查詢執行錯誤
) or end of expression expected (change the Query Language to 'C# Statements' for multi-statement queries)
查詢語言是C#中的表達。
如何解決這個問題?
Id=110000;
from u in BusProvinces
where (from s in BusProvinces
join buscities in BusCities on s.Id equals buscities.ProvinceId
join buspath in BusPaths on buscities.Id equals buspath.DesId
where (buspath.DepId == Id || Id == 0)
select s.Id).Contains(u.Id)
select u
答案是錯誤聲明。更改查詢語言。 –