The NHibernate Criteria API allows performing dynamic, object oriented queries in NHibernate.
Using the criteria API is one way to perform queries in NHibernate. Its strength is on writing dynamic queries at runtime. It lacks some features compared to HQL, for instance creation of cross products and joining objects on arbitrary properties.
Related:
- QueryOver is a successor of Criteria, which provides more type safety at compile time, but is still base on Criteria.
- Linq To NHibernate once based on Criteria, but had been rewritten to use HQL in later versions.
References: