Just a quick question. If I have a binding like so:
Bind<ISession>().ToMethod(context => context.Kernel.Get<ISessionManager>().GetSession()).InRequestScope();
(Assuming that ISessionManager.GetSession() returns SessionFactory.OpenSession())
Do I need to explicitly close the session? or will it automatically dispose itself when Ninject deems it out of scope?
If
ISessionimplementsIDisposableNinject will call it , And I think it does.Latest Source code : http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/trunk/nhibernate/src/NHibernate/ISession.cs?revision=5765&view=markup