title: How can I configure NHibernate so that I can create a new (Brand New) session as I need it?
body: <p>I have a console application that imports a file that the customer gives us.</p>
  
  <p>This file has multiple records and they need to be imported.</p>
  
  <p>If I use the single session to import them all, if one of them fails, they all fail.  This is terrible.</p>
  
  <p>I have been going crazy trying to simply figure out how to create a session.  Every single resource I have read is about how to configure NHibernate with Structure map in an MVC project to have a session per request.</p>
  
  <p>I get it.  That is good for the web. I know.</p>
  
  <p>I cannot have that here. I need a new session for every record.</p>
  
  <p>I want this</p>
  
  <pre><code>foreach(var record in recordsToImport)
  {
       //CREATE NEW SESSION or RANSACTION //I don't care about wrapping it in UnitOfWork
       //BEGIN TRANSACTION HERE
       myRepoClass.Update(record);
       //COMMIT TRANSACTION HERE
  
  }
  </code></pre>