String compare when using VB.NET throws ArgumentException

Description

When comparing a string with LINQ to Nhibernate, anyone using VB.NET gets the following error:

System.ArgumentException : Expression of type 'System.Int32' cannot be used for return type 'System.Boolean'

For example: Dim result = nhQueryProvider.Where(Function(code) code.Name = "OPEN")
This throws an error.

A detailed description of why it occurs and how to fix it is here:

http://jason.pettys.name/archive/2009/09/28/nhibernate-with-linq-error-with-string-comparisons-in-vb.net.aspx

Thanks so much and keep up the good work!

Environment

None

Assignee

Unassigned

Reporter

Gabriel Andrade

Labels

None

Components

Affects versions

Priority

Critical
Configure