I have the following code segment in which I get an error
using (var session = Database.OpenSession()) { var q = from x in session.Query<User>() where x.UserName == username & x.Password==EncodePassword(password) select x; if (q.Count() > 0) { result = true; } }
in if statement, I get an error
Unable to cast object of type 'NHibernate.Hql.Ast.HqlBitwiseAnd' to type 'NHibernate.Hql.Ast.HqlBooleanExpression'.
source share