ICriteria is used to represent the request. You can add ICriterions to this ICriteria to express filters.
For instance:
ICriteria crit = session.CreateCriteria (typeof(Person)); crit.Add (NHibernate.Criterion.Expression.Eq("Name", "somename"));
Or as stated in the documentation:
ICriterion: an object-oriented representation of the query criteria that can be used as a constraint in the ICriteria Request
ICriteria: A simplified API for retrieving objects by compiling NHibernate.Criterion.Expression objects.
source share