Inheritance: ISessionBuilder
Exemplo n.º 1
0
 public virtual IUnitOfWork GetCurrentUnitOfWork()
 {
     if (null == _unitOfWork)
     {
         var sessionBuilder = new SessionBuilder(_sessionFactoryBuilder);
         _unitOfWork = new NhibernateUnitOfWork(sessionBuilder);
     }
     return(_unitOfWork);
 }
Exemplo n.º 2
0
 public virtual IDataAccessor <T> Create <T>(string name)
 {
     if (null == _unitOfWork)
     {
         var sessionBuilder = new SessionBuilder(_sessionFactoryBuilder);
         _unitOfWork = new NhibernateUnitOfWork(sessionBuilder);
     }
     return(new NHibernateDataAccessor <T>(_unitOfWork));
 }