Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IHibernateOperations.Get(T)(Object) Method

Return the persistent instance of the given entity type with the given identifier, or a null reference (Nothing in Visual Basic) if not found. Obtains the specified lock mode if the instance exists.

[Visual Basic]
Public Sub Get(Of T)( _
   ByVal id As Object _
)
[C#]
T Get<T>(
   object id
);

Parameters

id
The id of the object to get.

Return Value

the persistent instance, or a null reference (Nothing in Visual Basic) if not found

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors

See Also

IHibernateOperations Interface | Spring.Data.NHibernate.Generic Namespace | IHibernateOperations.Get(T) Overload List