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); }
public void TestFieldNameMapper() { FieldPerson p = FieldPerson.FindByName("Jerry"); Assert.AreEqual(2, p.Id); }