I had a method with a lot of persistence calls that used a nHibernate session, it worked, was alright. But I needed to refactor this method, extracting a method from a conte
You can have one NHibernate SessionFactory for multiple threads as long as you have a separate NHibernate session for each thread.
here is an example that will give exceptions because it uses the same session for each thread:
https://forum.hibernate.org/viewtopic.php?p=2373236&sid=db537baa5a57e3968abdda5cceec2a24
The solution is to store sessions on the LocaldataStoreSlot, that way you can have a session-per-request model.