protected BaseRepository(IRavenSessionFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentNullException("factory", "Session Factory can not be null");
     }
     _factory = factory;
     CreateSession();
 }
 public void Dispose()
 {
     _factory = null;
     if (Session != null)
     {
         Session.Dispose();
     }
     Session = null;
 }
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         if (disposing)
         {
             _factory = null;
             _session.SaveChanges();
             _session.Dispose();
             _session = null;
         }
     }
     _disposed = true;
 }
 public AccountRepository(IRavenSessionFactory factory)
     : base(factory)
 {
 }
 public IRavenSessionFactory GetSessionFactory()
 {
     return _ravenSessionFactory ?? (_ravenSessionFactory = CreateSessionFactory());
 }
        //protected IDocumentSession Session
        //{
        //    get { return _factory.CreateSession(); }
        //}

        protected BaseRepository(IRavenSessionFactory factory)
        {
            _factory = factory;
            //Session = factory.CreateSession();
        }
 public IRavenSessionFactory GetSessionFactory()
 {
     return(_ravenSessionFactory ?? (_ravenSessionFactory = CreateSessionFactory(_connectionStringName)));
 }
 public RavenUnitOfWorkFactory(IRavenSessionFactory sessionFactory)
 {
     _sessionFactory = sessionFactory;
 }
 public RavenUnitOfWorkFactory(IRavenSessionFactory sessionFactory)
 {
     _sessionFactory = sessionFactory;
 }
 public IRavenSessionFactory GetSessionFactory()
 {
     return(_ravenSessionFactory ?? (_ravenSessionFactory = CreateSessionFactory(GetDefaultMembershipProviderConnectionStringName())));
 }