title: LINQ query to select by oldest and by id
body: <p>I am having this issue to select items. By now I am using this query:</p>
  <pre><code>var eventQuery = dbContext.ClientEvents
                            .Where(f =&gt; f.ClientEventStatusLogs.Any(e =&gt; e.StatusId == 2))
                            .Select(TransformEvent());
  </code></pre>
  <p><code>ClientEvents</code> is a list of events and every event can have another list of <code>ClientEventStatusLogs</code>. This query works fine most of the time. But If I have new <code>ClientEventStatusLogs</code> on this event with <code>StatusId</code> not 2 it will still gives me this <code>ClientEvent</code>, because of ANY. <code>ClientEventStatusLogs</code> have date column, so I would like to check <code>if StatusId == 2</code> only for the latest log.</p>
  <p>I hope you understand my problem.</p>