title: NHibernate: Is making session singleton a bad practice?
body: <p>In my application I have the session as a singleton object in a <code>SessionManager</code> class. Whenever, I need to use it a some part of the application, I do:</p>
  
  <pre><code> using (var session = SessionManager.OpenSession())
   {
  
   }
  </code></pre>
  
  <p>Is this possibly a bad practice ? If so, any ideas about how I can improve ?</p>
  
  <p><strong>EDIT</strong>: Here is the implementation of session manager</p>
  
  <pre><code> public static class SessionManager
      {
          private static readonly ISessionFactory sessionFactory;
  
  
          static SessionManager()
          {
              sessionFactory = Fluently.Configure().....
          }
  
  
          public static ISessionFactory SessionFactory
          {
              get { return sessionFactory; }
          }
  
  
          public static ISession OpenSession()
          {
              return sessionFactory.OpenSession();
          }
      }
  </code></pre>