score:2

Accepted answer

Actually, due to the clause WHERE 0 = 1 this SQL will return an empty recordset (i.e. correctly mapped in terms of the schema, but with no rows).

The code you give seems correct, but something has convinced the query provider that there can never be a matching row.

Assuming it's not correct in this, I'd look at the column mapping for the id property. Does it match that of the database correctly?

score:0

Probably your list is coming empty, this is the normal behavior of Linq.

score:0

Try this:

Dim strval As String = ""
Dim strnum(30) As String

strval = "1,2,3,4,5,6,7,9"

strnum = strval.split(",")

originalEventsToUpdate = (from a in Db.tbl_ffk_event where strnum.contains(a.id) select a).tolist

Related Articles