コード例 #1
0
        public void TestSession()
        {
            ISession session = YangNHibernate.getSession();

            Assert.IsNotNull(session);
            session.Close();
        }
コード例 #2
0
        public void TestSaveUser()
        {
            User     user    = createUser();
            ISession session = YangNHibernate.getSession();

            ITransaction tx = session.BeginTransaction();

            session.Save(user);
            tx.Commit();

            session.Close();
        }