Suppose the following Query using a NH 3.4 and RepositoryPattern
var list = _repository
.QueryOver()
.Where(x => (x.Age > 20)) // notice the parantheses
.Future()
.ToList();
Whith these parantheses added the NH is failing to work, and causes a SO exception.
If replacing .Where(x => (x.Age > 20))
with .Where(x => x.Age > 20)
it works as expected.
Any clues on why it doesn't work with extra parantheses?
Note
This is a simplified scenario from the bigger picture. In production i'm passing that .Where(...)
through a parameter Expression<Func<Person, bool>> where