Thursday, 5 September 2013

LINQ2SQL Where Clause Issues

LINQ2SQL Where Clause Issues

I cannot get the following linq query to work in vb.net. (SQLite
database). If I take out the where clause it works. With the where clause
I get an "argumentexception was unhandled (New)" error. It is a simple
where clause! What can be wrong?
Dim testList = (From tp In dc.testParam _
Join jctp In dc.jobCodetestParam On tp.testParamId
Equals jctp.testParamId _
Join jc In dc.jobCode On jc.jobCode Equals jctp.jobCode _
Join p In dc.patient On p.jobCode Equals jc.jobCode _
Where p.patientId = 20 _
Select tp.testDescriptor).ToList()

No comments:

Post a Comment