GetCurrentSession() public method

public GetCurrentSession ( ) : ISession
return ISession
コード例 #1
0
        public void Setup()
        {
            var model = NHibernateHelper.SkapaPeristanceModel();

            var cfg = Fluently.Configure()
                .Database(SQLiteConfiguration.Standard.ShowSql().InMemory);

            _sessionSource = new SessionSource(cfg.BuildConfiguration().Properties, model);

            _sessionHelper = new SQLiteSessionHelper(_sessionSource);
            _sessionHelper.StartSession();
            _sessionSource.BuildSchema(_sessionHelper.GetCurrentSession());
        }