public void GetSession_WithoutArgs_UsesDefaultSimoConnectionInfo()
        {
            var factory = new SimoSessionFactory();

            using(var session = factory.GetSession())
            {
               Assert.AreEqual(SimoConnectionInfo.Default, session.Connection.SimoConnectionInfo);
            }
        }
Esempio n. 2
0
        public void SessionFactory_Example()
        {
            //So there's a verry simple SessionFactory inplace,
            //but you can of course make one of your own or
            //let an IoC return sessions.

            var sessionFactory = new SimoSessionFactory();
            using (var session = sessionFactory.GetSession(Constants.ConnectionStringName))
            {
                session[DbName].DropDatabase();
            }
        }