Hi all,
I'm trying to get a random selection of records out of a table. I'm trying to do this using maxNumberOfItems set to 5 and a 'random' sort clause:
ISortClause randomClause = new EntityField("NEWID()", new Expression()) | SortOperator.Ascending;
However, when I use that sort clause as an argument in one of the TypedListDAO.GetAsDataReader overloads, the maxNumberOfItems argument gets ignored (no SELECT TOP 5 is generated in the resulting SQL) and returns too many items. When I take the Sort clause out, it works fine, only returning 5 items...
Any ideas?
Thanks.