【发布时间】:2011-01-18 10:17:06
【问题描述】:
以下源码:
sectors1 = from sector in db.GetTable<InfrSect>();
sectors2 = from sector in sector1
join team in db.GetTable<Team>() on sector.TeamId equals team.Id
where team.CountryId == iCountryId
select sector;
IList<InfrSect> list = sectors2.ToList<>();
生成以下查询:
SELECT sector.team as TeamId
FROM infr_sect sector
INNER JOIN Team t1 ON sector.team = t1.Id
WHERE t1.Country =
生成的查询不包含“iCountryId”参数。
为什么?我该如何解决这个错误?
谢谢。
【问题讨论】:
-
如何确定正在生成什么查询?你是通过 Sql Profiler 找到我的,还是?
标签: .net linq-to-sql bltoolkit