views:

60

answers:

1

I want fetch a list that uses both IQuery and ICriterias.. Is it possible? How do I do this?

+1  A: 

You can do it with Linq to Objects...

var listUsingCriteria = session.CreateCriteria(...).List<Something>();
var listUsingQuery = session.CreateQuery(...).List<Something>();
var allElements = listUsingCriteria.Concat(listUsingQuery);

Of course, after adding the elements, you can sort, filter, etc.

Diego Mijelshon