Thank you for your help in advance!
I have the following query:
var sortedResult = from element
&& element.CinemaId == cinemaId
orderby element.AdjustedReleaseDate descending
This query works fine. When I databind this to say, a grid, everything is as it should be:
GridView1.DataSource = sortedResult.Take(6);
Now, when I put in a distinct clause into the mix, like so:
GridView1.DataSource = sortedResult.Distinct().Take(6);
I lose the orderby from the original query. A comment on this article
explains that if a distinct clause is used after an orderby clause, then the orderby is ignored.
Can someone please tell me how I can implement both the orderby and distinct in this situation?