title: Convert Nested Foreach to Linq
body: <p>I am trying to re-write the following using LINQ </p>
  
  <pre><code>foreach (WMCommon.Services.StakeOut.assembly ass in assemblies) 
  {
    foreach (var agg in aggregate) 
    {
      if ( agg.catagory.unitActn   == ass.unitActn   &amp;&amp;
           agg.catagory.unitCode   == ass.unitCode   &amp;&amp;
           agg.catagory.unitLength == ass.unitLength
      ) 
      {
        ass.quantity = agg.qty;
      }
    }
  }
  </code></pre>
  
  <p>This is as far as I got: </p>
  
  <pre><code>assemblies.Where( a =&gt; a.quantity = ( aggregate.Where( p =&gt; p.catagory.unitActn == a.unitActn &amp;&amp; p.catagory.unitCode == a.unitCode &amp;&amp; p.catagory.unitLength == a.unitLength).Select(s=&gt;s.qty)));
  </code></pre>
  
  <p>Thank for your help in advance. I am hoping that the LINQ will be much faster than nested FOREACH?</p>