I'm playing around with the NHibernate.Linq.dll and I'm having problems using it in combination with VB.NET.
I've started out with a very easy query:
Code:
From myBO In session.Linq(Of myBusinessObject)() _
Where myBO.myProperty = "test" _
Select myBO
The query throws the following error when I ask for the results:
"Expression of type 'System.Int32' cannot be used for return type 'System.Boolean'"
A very weird error so I tried the same query in a C# project:
Code:
from myBO in session.Linq<myBusinessObject>()
where myBO.myProperty == "test"
select myBO;
When I ask the results from the C# query it works perfectly. Before getting to deep into the NHibernate.Linq.dll code I would like to get confirmation if there are many known issues with the Linq for NHibernate dll in combination with VB.NET? Because when I look at the error I suspect a problem with the dll building the lambda expression and/or expression tree with the VB.NET language...