Hi I'm using AsPagination from MvcContrib and since this method also counts the total number of results I noticed a bug when using ordering.
Working code: var q = from u in db.Users select u; int records = q.Count(); Non working code: var q = from u in db.Users orderby u.Username ascending select u; int records = q.Count(); The genereted sql is: SELECT count(*) as y0_ FROM Users this_ ORDER BY this_.Username asc which results in: Column "Users.Username" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause. Can anyone give me some pointers as how to fix this issue? /Anders --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
