public void MinDateTime() { using (new SoodaTransaction()) { DateTime result = PKDateTime.Linq().Min(d => d.Id); Assert.AreEqual(new DateTime(2000, 1, 1), result); } }
public void SelectMaxDateTime() { using (new SoodaTransaction()) { DateTime result = PKDateTime.Linq().Select(d => d.Id).Max(); Assert.AreEqual(new DateTime(2000, 1, 1, 2, 0, 0), result); } }
public void MaxDateTime() { using (new SoodaTransaction()) { IEnumerable <DateTime> de = from d in PKDateTime.Linq() group d by d.Id.Year into g select g.Max(d => d.Id); CollectionAssert.AreEqual(new DateTime[] { new DateTime(2000, 1, 1, 2, 0, 0) }, de); } }