As I mentioned, we are usign Spring.Net. Our data access objects
derive from Spring's "HibernateDaoSupport" object. Here is the code
for CurrentSession get property.
public ISession CurrentSession
{
get
{
ISession session = null;
try
{
session =
HibernateTemplate.SessionFactory.GetCurrentSession();
}
catch (HibernateException)
{
session = DoGetSession(true); // spring method.
}
catch (Exception ex)
{
_logger.Error(_className, "CurrentSession", "Error
getting a valid session", ex);
throw;
}
return session;
}
}
On May 28, 7:27 am, Tuna Toksoz <[email protected]> wrote:
> using (ISession session = CurrentSession)
> {
>
> CurrentSession is a prop returning the same instance ?
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
>
>
> On Thu, May 28, 2009 at 3:25 PM, Waqar Sadiq <[email protected]> wrote:
>
> > using (ISession session = CurrentSession)
> > {- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---