title: Query to retrieve the latest status of each action
body: <p>I'm new about LinQ technologies. My program generates actions (moving files, deleting files, ...) and saves the status of each action in a database. Let's say that the statutes are simply  passed (1) or failed (0). While my action isn't a success I try it again. For each trial I write a line in my database :</p>
  
  <pre><code>ID  ProcessedOn             ActionID  Description  Status
  --- ----------------------- --------- ------------ ------
  20  2011-05-20 10:45:01.440 24871     xxx          0 
  21  2011-05-20 10:45:09.080 24873     xxx          0 
  22  2011-05-20 11:00:01.993 24871     xxx          0 
  23  2011-05-20 11:00:10.477 24873     xxx          1 
  24  2011-05-20 11:15:08.127 24871     xxx          1  
  </code></pre>
  
  <p>I would like to write a LINQ query to retrieve the latest status of each action between 2 moment. Is this possible?</p>
  
  <p>I already wrote this : </p>
  
  <pre><code> MyTable.Where(t =&gt; t.ProcessedOn &gt;= start).Where(t =&gt; t.ProcessedOn &lt;=
   stop).OrderBy(t =&gt; t.ProcessedOn).ToList();
  </code></pre>
  
  <p>This request requires an additional condition to keep only the last status. I need to keep the ProcessedOn greater time for each ActionID.</p>