Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IHibernateCallback(T).DoInHibernate Method

Gets called by HibernateTemplate with an active Hibernate Session. Does not need to care about activating or closing the Session, or handling transactions.

[Visual Basic]
Public Sub IHibernateCallback( _
   ByVal session As ISession _
)
[C#]
T IHibernateCallback(
   ISession session
);

Parameters

session
The active Hibernate session

Return Value

A result object.

Remarks

Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain objects. Note that there's special support for single step actions: see HibernateTemplate.find etc.

See Also

IHibernateCallback<T> Interface | Spring.Data.NHibernate.Generic Namespace