开发者

Orchard NHibernate Session Factory Initialize

开发者 https://www.devze.com 2023-03-29 02:30 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消