Ejemplo n.º 1
0
        public void MinOfDateTimeColumnWithoutGroupBy()
        {
            DateTimeValueResults r = new DateTimeValueResults();

            q = Select.Results(r.Value).
                       From(e).
                       Columns(Min.Of(e.LastActivityDate).As(r.Value));

            AssertSql("SELECT MIN(LastActivityDate) Value FROM Employee");

            AssertRowCount(1);

            AssertRow(DateTime.MinValue);
        }
Ejemplo n.º 2
0
        public void MaxOfDateTimeColumnWithoutGroupBy()
        {
            DateTimeValueResults r = new DateTimeValueResults();

            q = Select.Results(r.Value).
                       From(e).
                       Columns(Max.Of(e.LastActivityDate).As(r.Value));

            AssertSql("SELECT MAX(LastActivityDate) Value FROM Employee");

            AssertRowCount(1);

            AssertRow(new DateTime(2009, 2, 2, 21, 36, 0));
        }