public void TestMinDate() { var n = DbEntry.From <DateAndTime>().Where(Condition.Empty).GetMinDate(p => p.dtValue); Assert.AreEqual(DateTime.Parse("2004-8-19 18:51:06"), n); n = DateAndTime.GetMinDate(Condition.Empty, p => p.dtValue); Assert.AreEqual(DateTime.Parse("2004-8-19 18:51:06"), n); var x = DateAndTime.GetMinDate(p => p.Id > 100, p => p.dtValue); Assert.IsNull(x); }