Entity Get latest results based on date : <p>I have the following table:</p>

<pre><code>------------------------------------
userid | testid | date     | result
1      | 1      | 18-01-01 | 1
1      | 1      | 18-01-09 | 6
1      | 3      | 18-01-09 | 5
1      | 3      | 18-01-10 | 2
</code></pre>

<p>Now i need to get 2 rows using Entity: The following:</p>

<pre><code>------------------------------------
userid | testid | date     | result
1      | 1      | 18-01-09 | 6
1      | 3      | 18-01-10 | 2
</code></pre>

<p>I need a LINQ query that returns the latest result of each testid in the database. The userID/testID is the group. What is the best and fastest way to get this information?</p>

<p>Thanks,</p>
