I have a query by QueryOver in Nhibernate3.1
var q = SessionInstance.QueryOver<Person>()
.Where(x => IsActive(x.PersonType) == true);
return q.List<Person>();
By this method:
private bool IsActive(PersonType type)
{
if(type == PersonType.Employee
return true;
else
return false;
}
Now it has a runtime error by this message:
Unrecognised method call in expression value
Why?