コード例 #1
0
        public void TestSum()
        {
            DbEntry.From <SinglePersonSqlite>().Where(Condition.Empty).GetSum("Id");
            AssertSql(@"SELECT SUM([Id]) AS [Id] FROM [People];
<Text><60>()");

            var n = DbEntry.From <SinglePerson>().Where(Condition.Empty).GetSum("Id");

            Assert.AreEqual(6, n);

            n = FieldPerson.GetSum(Condition.Empty, "Id");
            Assert.AreEqual(6, n);
        }
コード例 #2
0
        public void TestFieldNameMapper()
        {
            FieldPerson p = FieldPerson.FindByName("Jerry");

            Assert.AreEqual(2, p.Id);
        }