开发者

NHibernate - ISession vs. IStatelessSession

开发者 https://www.devze.com 2022-12-28 02:34 出处:网络
What is the pros and cons using IStatel开发者_如何学CessSession over ISession in NHibernate?StatelessSession doesn\'t tracks changes made to the entities and has no lazy loading support. Thats why it

What is the pros and cons using IStatel开发者_如何学CessSession over ISession in NHibernate?


StatelessSession doesn't tracks changes made to the entities and has no lazy loading support. Thats why it has a better performance than Session.

But with stateless session you are forced to manage Insert, Delete, Update operations manually and this really uncomfortable.

Stateless session is made for batch operations where you need to make a lots of queries to database and you don't need tracking changes, etc.

0

精彩评论

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