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