Пример #1
0
        public void can_get_users_without_linq()
        {
            //make sure migration has been run
            MigrationTests mig = new MigrationTests();
            mig.RunMigration();

            var session = SessionFactory.CreateSessionFactory().OpenSession();
            var list = session.CreateCriteria<User>().List<User>();
            Assert.True(list.ToList().Count == 10);
        }
Пример #2
0
        public void can_get_users()
        {
            //make sure migration has been run
            MigrationTests mig = new MigrationTests();
            mig.RunMigration();

            var session = SessionFactory.CreateSessionFactory().OpenSession();
            var list = from c in session.Linq<User>()
                       select c;
            Assert.True(list.ToList().Count == 10);
        }