Exemplo n.º 1
0
        /// <summary>
        /// Gets the session.
        /// </summary>
        /// <returns>An ISession object.</returns>
        public ISession GetSession()
        {
            ISessionFactory sessionFactory = _sessionFactoryProvider.GetFactory(null); // Bind seesion to the context etc.
            ISession        session        = sessionFactory.GetCurrentSession();

            return(session);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the stateless session.
        /// </summary>
        /// <returns>An IStatelessSession object.</returns>
        public IStatelessSession GetStatelessSession()
        {
            ISessionFactory   sessionFactory   = _sessionFactoryProvider.GetFactory(null);
            IStatelessSession statelessSession = sessionFactory.OpenStatelessSession();

            return(statelessSession);
        }
 public NHibernateInformationService( ISessionFactoryProvider sessionFactoryProvider )
 {
     _sessionFactory = sessionFactoryProvider.GetFactory ( null );
 }
Exemplo n.º 4
0
 public NHibernateInformationService(ISessionFactoryProvider sessionFactoryProvider)
 {
     _sessionFactory = sessionFactoryProvider.GetFactory(null);
 }