开发者

Call NHibernate Repository from HttpApplication.Init()

开发者 https://www.devze.com 2023-01-02 11:07 出处:网络
In S#Arch based web application I need to read some data during the application initialization. From the first point, the best place - HttpApplication.Application_Start() or HttpApplicati开发者_运维知

In S#Arch based web application I need to read some data during the application initialization. From the first point, the best place - HttpApplication.Application_Start() or HttpApplicati开发者_运维知识库on.Init()

But, Application_Start isn't applicable as there is no WebSessionStorage yet. Init() seems isn't fit as well, as there is no NHibernateSession.

What would you suggest?


Can't you load it (and load only once) app first request?

nhibernate has some problems initialing on Init(), thats why it is on begin_request on s#arp

0

精彩评论

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