Create a new ICriteria instance, for the given entity class, or a superclass of an entity class, with the given alias.

Namespace: NHibernate.Impl
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public ICriteria CreateCriteria<T>(
	string alias
)
where T : class
Visual Basic
Public Function CreateCriteria(Of T As Class) ( _
	alias As String _
) As ICriteria
Visual C++
public:
generic<typename T>
where T : ref class
virtual ICriteria^ CreateCriteria(
	String^ alias
) sealed

Parameters

alias
Type: System..::..String
The alias of the entity

Type Parameters

T
A class, which is persistent, or has persistent subclasses

Return Value

The ICriteria.

Implements

IStatelessSession..::..CreateCriteria<(Of <<'(T>)>>)(String)

Remarks

Entities returned by the query are detached.

See Also