title: Linq one list to select multiple items from another list
body: <p>I have three classes as below:</p>
  <pre><code>public class Product
  {
      int id { get; set; }
      int creationDate { get; set; }
  }
  public class ProductList
  {
      List&lt;Product&gt; productsList;
  }
  </code></pre>
  <p>And</p>
  <pre><code>public class SelectedId
  {
      List&lt;int&gt; selectedIds;
  }
  </code></pre>
  <p>Now I have 2 lists:</p>
  <ol>
  <li><p>selectedIds</p>
  </li>
  <li><p>products</p>
  <p>I want to get each <code>Product</code> from <code>productsList</code> whose <code>Id</code> is equal to the values in <code>selectedId</code> in the sequence of <code>Ids</code> mentioned in <code>selectedIds</code>.</p>
  </li>
  </ol>
  <p>Presently I am doing something like this:</p>
  <pre><code>foreach (var sID in selectedId)
  {
     var product = productsList.First(x =&gt; x.id == sID);
     products.Add(product);
  }
  </code></pre>
  <p>Please suggest a better way to do the same.</p>