Some applications need to create criteria queries in "detached mode", where the Hibernate session is not available. This class may be instantiated anywhere, and then a ICriteria may be obtained by passing a session to GetExecutableCriteria(). All methods have the same semantics and behavior as the corresponding methods of the ICriteria interface.

Namespace:  NHibernate.Expression
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public Class DetachedCriteria
C#
[SerializableAttribute]
public class DetachedCriteria
Visual C++
[SerializableAttribute]
public ref class DetachedCriteria
JavaScript
NHibernate.Expression.DetachedCriteria = function();

Type.createClass(
	'NHibernate.Expression.DetachedCriteria');

Inheritance Hierarchy

System..::.Object
  NHibernate.Expression..::.DetachedCriteria

See Also