Question

The following source code:

                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<>();

Generate the following query:

SELECT sector.team as TeamId
FROM infr_sect sector
INNER JOIN Team t1 ON sector.team = t1.Id
WHERE t1.Country =

The generated query doesn't contain 'iCountryId' parameter.

Why? How can I fix the error?

Thanks.

Was it helpful?

Solution

The problem was in custom DB provider. I didn't mention in question that I use MySql DB. I've replaced the source code of my MySqlDataProvider with a source code of same class from the BLToolkit source code and everything became workable.

Here is a link to solution on the 'BLToolKit support forum': http://rsdn.ru/forum/prj.rfd/4109840.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top