Пример #1
0
        public void TestCountTopics()
        {
            TopicTest tt = new TopicTest();
            tt.Session = Session;
            tt.Create();

            int count = new CountQuery(Session, typeof(Topic), "Topic")
                .Add(Expression.Eq("Name", tt.Topic.Name))
                .Execute<int>();

            Assert.AreEqual(1, count);

            tt.Delete();
        }
Пример #2
0
        public void TestCountTopics()
        {
            TopicTest tt = new TopicTest();

            tt.Session = Session;
            tt.Create();

            int count = new CountQuery(Session, typeof(Topic), "Topic")
                        .Add(Expression.Eq("Name", tt.Topic.Name))
                        .Execute <int>();

            Assert.AreEqual(1, count);

            tt.Delete();
        }