Orchard NHibernate Session Factory Initialize
I'm currently looking at the Orchard source code and can't find where the NHibernate Session Factory been registered into the AutoFac. Anybod开发者_开发知识库y can help with that?
Thank you
Orchard.Framework\Data\SessionFactoryHolder.cs is probably a good place to start. I believe that's where the NHib configuration is built and the session is initialized.
The correct answer is ShellContainerFactory
.
In ShellContainerFactory
, it will scan all from IDependency
inherited classes and register them. The SessionFactoryHolder
is inherited from IDependency
so it will be registered automatically.
精彩评论