Construct a new key for a collection or entity instance. Note that an entity name should always be the root entity name, not a subclass entity name.

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

Syntax

Visual Basic (Declaration)
Public Sub New ( _
	id As Object, _
	type As IType, _
	entityOrRoleName As String, _
	factory As ISessionFactoryImplementor _
)
C#
public CacheKey(
	Object id,
	IType type,
	string entityOrRoleName,
	ISessionFactoryImplementor factory
)
Visual C++
public:
CacheKey(
	Object^ id, 
	IType^ type, 
	String^ entityOrRoleName, 
	ISessionFactoryImplementor^ factory
)
JavaScript
NHibernate.Cache.CacheKey = function(id, type, entityOrRoleName, factory);

See Also