title: LINQ OrderBy: best search results at top of results list
body: <p>Consider the need to search a list of Customer by both first and last names. The desire is to have the results list sorted by the Customer with the most matches in the search terms.</p>
  
  <pre>
  FirstName      LastName
  ----------     ---------
  Foo            Laurie
  Bar            Jackson
  Jackson        Bro
  Laurie         Foo
  Jackson        Laurie
  </pre>
  
  <pre><code>string[] searchTerms = new string[] {"Jackson", "Laurie"};
  
  //want to find those customers with first, last or BOTH names in the searchTerms
  var matchingCusts = Customers
                         .Where(m =&gt; searchTerms.Contains(m.FirstName)
                                 ||  searchTerms.Contains(m.LastName))
                         .ToList();
  
  /* Want to sort for those results with BOTH FirstName and LastName 
     matching in the search terms. Those that match on both First and Last
     should  be at the top of the results, the rest who match on 
     one property should be below.
  */
  
   return matchingCusts.OrderBy(m=&gt;m); 
  </code></pre>
  
  <p>Desired Sort:</p>
  
  <pre><code>Jackson        Laurie  (matches on both properties)
  Foo            Laurie
  Bar            Jackson
  Jackson        Bro
  Laurie         Foo
  </code></pre>
  
  <p>How can I achieve this desired functionality with LINQ and <code>OrderBy</code> / <code>OrderByDescending</code>?</p>