0

In our design we have the Silverlight Layer as the UI, the WCF layer and then the repository layer which communicates with the Database. We are doing the NHibernate operations in the repository layer solely. Presently we are following the pattern of using the session object in the using statement. This disposes our session after each functionality. So we cannot utilize the lazy loading feature in the WCF layer.

Now my question, is there any better way of using the session object ? Or can we leave the session objects open without disposing them ? Will this have a hit on the system ?

Also I have gone through the codes which show how sessions can be implemented using HTTPContext. Is this possible in my design as my repository layer sits far behind the Web Layer ?

Huzefa Kagdi
  • 159
  • 1
  • 4
  • 11

1 Answers1

2

try uNhAddIns the implementation is quite natural, for normal use you don't event need to care about session.

ktutnik
  • 6,882
  • 1
  • 29
  • 34