How could I remove repetition from this linq-to-entities query? This linq query works, and it does what I want it to do, but is there any other way I could improve the query so I'm not repeating a.AnswerRevisions.OrderByDescending(r =&gt; r.DateCreated).FirstOrDefault()?

IQueryable&lt;Article&gt; query = from a in _db.Articles
                            orderby a.DateCreated descending
                            where a.AnswerRevisions.Count &gt; 0 &amp;&amp;
                            (a.AnswerRevisions.OrderByDescending(r =&gt; r.DateCreated).FirstOrDefault().UpVotes -
                             a.AnswerRevisions.OrderByDescending(r =&gt; r.DateCreated).FirstOrDefault().DownVotes &lt; 0)
                            select a;
Use the let statement and also do the final orderby after the where clause, this will increase efficiency, as less entries will have to be sorted

IQueryable&lt;Article&gt; query = from a in _db.Articles 
    let  rev = a.AnswerRevisions.OrderByDescending(r =&gt; r.DateCreated).FirstOrDefault()
    where a.AnswerRevisions.Count &gt; 0 &amp;&amp; 
          (rev.UpVotes - rev.DownVotes &lt; 0) 
    orderby a.DateCreated descending 
    select a;