bltoolkit:执行Iqueryable <>查询时未使用参数
-
09-10-2019 - |
题
以下源代码:
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”参数。
为什么?如何解决错误?
谢谢。
解决方案
问题在于自定义DB提供商。我没有提到我使用MySQL DB。我已经用BltoolKit源代码的同一类的源代码替换了MySqlDatapRovider的源代码,一切都变得可行。
这是“ BltoolKit支持论坛”上解决方案的链接: http://rsdn.ru/forum/prj.rfd/4109840.aspx
不隶属于 StackOverflow