Sorry to bother you on this, but I'm a little confused. I have this code in a sub called in Page_Load
Dim db As dbVulcanoEntities
Dim intervento As Interventi
Dim idint As Integer
idint = Request.QueryString("idint")
intervento = db.Interventi.Where(Function(i) i.IDInt = idint).Single
It fails on last line (in debug I see that idint has value) and if I query the db I get 1 record. Odd thing is that I used this exact same code in another page of the same project (more than once,actually) and it works with no problem... I can't understand why it's not working here... hints!? Thank you
EDIT: I tried to add a condition like this
If db.Interventi.Any(Function(i) i.IDInt = idint) Then
but it doesn't even pass it, so I guess it doesn't like the "i.IDInt = idint" part for some reason.