Exemple #1
0
        public void SqlQueryable_Count_Predicate()
        {
            // Prepare the test data
            IQueryable <Record> query = new SqliteQueryable(connection, "Course", new[] { "Id", "Name" });

            // Perform the test operation
            int count = query.Count(x => (int)x["Course"]["Id"] == 2 || (int)x["Course"]["Id"] == 3);

            // Check the test result
            Assert.AreEqual(2, count);
        }
Exemple #2
0
        public void SqlQueryable_Count()
        {
            // Prepare the test data
            IQueryable <Record> query = new SqliteQueryable(connection, "Course", new[] { "Id", "Name" });

            // Perform the test operation
            int count = query.Count();

            // Check the test result
            Assert.AreEqual(ConnectionTestHelper.CountCourses, count);
        }