Create a new proxy

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

Syntax

Visual Basic (Declaration)
Function GetProxy ( _
	id As Object, _
	session As ISessionImplementor _
) As INHibernateProxy
C#
INHibernateProxy GetProxy(
	Object id,
	ISessionImplementor session
)
Visual C++
INHibernateProxy^ GetProxy(
	Object^ id, 
	ISessionImplementor^ session
)
JavaScript
function getProxy(id, session);

Parameters

id
Type: System..::.Object
The id value for the proxy to be generated.
session
Type: NHibernate.Engine..::.ISessionImplementor
The session to which the generated proxy will be associated.

Return Value

The generated proxy.

Exceptions

ExceptionCondition
NHibernate..::.HibernateExceptionIndicates problems generating requested proxy.

See Also