开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜