title: Sort a list from another list IDs
body: <p>I have a list with some identifiers like this:</p>
  
  <pre><code>List&lt;long&gt; docIds = new List&lt;long&gt;() { 6, 1, 4, 7, 2 };
  </code></pre>
  
  <p>Morover, I have another list of <code>&lt;T&gt;</code> items, which are represented by the ids described above.</p>
  
  <pre><code>List&lt;T&gt; docs = GetDocsFromDb(...)
  </code></pre>
  
  <p>I need to keep the same order in both collections, so that the items in <code>List&lt;T&gt;</code> must be in the same position than in the first one (due to search engine scoring reasons). And this process cannot be done in the <code>GetDocsFromDb()</code> function. </p>
  
  <p>If necessary, it's possible to change the second list into some other structure (<code>Dictionary&lt;long, T&gt;</code> for example), but I'd prefer not to change it.</p>
  
  <p>Is there any simple and efficient way to do this "ordenation depending on some IDs" with LINQ?</p>