title: Custom sorting with LINQ
body: <p>It seems that i'm missing something trivial.  </p>
  
  <p>Anyway, here it goes:</p>
  
  <pre><code>var order = new[]{1,3,2};
  var foos = new[]{new Foo{Id=1}, new Foo{Id=2}, new Foo{Id=3}};
  </code></pre>
  
  <p>How to sort foos by order array using Linq?  </p>
  
  <p>Desired result:</p>
  
  <pre><code>foos == new[]{new Foo{Id=1}, new Foo{Id=3}, new Foo{Id=2}};
  </code></pre>
  
  <p><strong>Edit:</strong><br>
  Order contains Foo ids. Sorry that i didn't mention that. Sometimes it's even harder to ask question properly than to answer it. :)</p>