Esempio n. 1
0
 public void MinDateTime()
 {
     using (new SoodaTransaction())
     {
         DateTime result = PKDateTime.Linq().Min(d => d.Id);
         Assert.AreEqual(new DateTime(2000, 1, 1), result);
     }
 }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
        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);
            }
        }