Hi all.
I have a ASP.NET MVC3 application using the Transaction ASP.NET MVC action
filter from NH 3 Cookbook, so current_session_context_class="web".
Everything works fine except in a controller action method which uses
multi-threading.
I cannot figure out how to initialize current session context used by
injected repositories (used within the threads).
Each thread has the SessionFactory singleton injected and executes:
using (var session = sessionFactory.OpenSession())
{
CurrentSessionContext.Bind(session); <--- this throws
NullReferenceException
Any help?
Thanks in advance,
Marcello.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/kbuTKPELosMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.