title: Asynchronous queries in a web app, using NHibernate
body: <p>In a web application, the Session is only available in the current thread.</p>
  
  <p>Does anyone have any tips for executing queries through NHibernate in a new asynchronous thread?</p>
  
  <p>For example, how could I make something like this work:</p>
  
  <pre><code>public void Page_Load()
  {
      ThreadPool.QueueUserWorkItem(state =&gt; FooBarRepository.Save(new FooBar()));
  }
  </code></pre>