public MvcApplication()
 {
     NHibernateProfiler.Initialize();
     EndRequest += delegate { NHibernateHelper.EndContextSession(Kernel.Get <ISessionFactory>()); };
 }