I have an Nhibernate object that has the properties Firstname and Surname, and I'd like to be able to query on both fields (Firstname + " " + Surname); e.g. If the search term is "John Doe", this will be matched when John and Doe are in seperate fields.
How can I achieve that? Thanks!
So I ended up going with:
Which seems to work as I need it to.
for example, using LINQ:
you could do it with QueryOver, which looks almost the same:
UPDATE: I missed the point of the question.
what about this: