public override ISessionFactory GetSessionFactory()
        {
            string connectionString = Configuration.Properties[NHibernate.Cfg.Environment.ConnectionString];

            _openConnection = new SQLiteConnection(connectionString);
            _openConnection.Open();

            BuildSchema(Configuration, _openConnection);

            _innerSessionFactory = base.GetSessionFactory();
            _innerSessionFactory.OpenSession(_openConnection);

            _sessionFactory = new SingleConnectionSessionFactory(_innerSessionFactory, _openConnection);

            return(_sessionFactory);
        }
        public override ISessionFactory GetSessionFactory()
        {
            _innerSessionFactory = base.GetSessionFactory();

            _openConnection =
                new SQLiteConnection(Configuration.Properties[NHibernate.Cfg.Environment.ConnectionString]);
            _openConnection.Open();

            BuildSchema(Configuration, _openConnection);

            _innerSessionFactory.OpenSession(_openConnection);

            _sessionFactory = new SingleConnectionSessionFactory(_innerSessionFactory, _openConnection);

            return _sessionFactory;
        }