asp.net - does it make sense to cache nhibernate entities in httpcontext.current.session? -


I am learning NHibernate and lately looking at some code where NHibernate was used in an ASP.NET MVC project.

In a certain part of this app, organizations (HTTP) Are being kept in Is it OK, or if you (NHibernate) use session-per-request patterns, there are any dangers with it?

I do not recommend it unless you really do not know what you're doing with my head From the top:

  • Objects stored in https must be completely serialized, otherwise the storage of non-inopro session will be broken.
  • Unless you do not lazily load the unit again in the new session.

If you want a cross-request conversation, then it is a framework designed for a specific purpose.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -