Exemplo n.º 1
0
        protected override IDataSession CreateDataSessionInternal(string name)
        {
            ISessionFactory sessionFactory;

            if (_sessionFactoryByName.TryGetValue(name, out sessionFactory))
            {
                var session     = sessionFactory.OpenSession();
                var dataSession = new NHibernateDataSession(name, session);
                return(dataSession);
            }
            // When name not recognized return null
            return(null);
        }
 public NHibernateUnitOfWork(NHibernateDataSession dataSession)
     : base(Log, dataSession)
 {
     _tx = dataSession.Session.BeginTransaction();
 }