Hi,
I would like to combine 2 different ICriteria objects (both created against the same entity type), but I do not know how.
an example:
ICriteria userCrit = session.CreateCriteria(typeof(Foo));
.. dev then adds expressions they need for their app purpose
userCrit.Add(Expression.Eq("bar", 1));
.. dev asks framework for data filtering criteria (outside of devs control, doesn't know what conditions the framework will add)
ICriteria filterCrit = Framework.ReturnDataFilter(x,y,z);
* now I want to 'join' them..
userCrit.Add(filterCrit); // How do I acheive this????
IList result = userCrit.List();
|