Inheritance: ISessionBuilder
Example #1
0
 public virtual IUnitOfWork GetCurrentUnitOfWork()
 {
     if (null == _unitOfWork)
     {
         var sessionBuilder = new SessionBuilder(_sessionFactoryBuilder);
         _unitOfWork = new NhibernateUnitOfWork(sessionBuilder);
     }
     return(_unitOfWork);
 }
Example #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));
 }