What is the pros and cons using IStatelessSession over ISession in NHibernate?
What is the pros and cons using IStatelessSession over ISession in NHibernate?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.