title: Performance concern when using LINQ "everywhere"?
body: <p>After upgrading to ReSharper5 it gives me even more useful tips on code improvements. One I see everywhere now is a tip to replace foreach-statements with LINQ queries. Take this example: </p>
  
  <pre><code>private Ninja FindNinjaById(int ninjaId)
  {
      foreach (var ninja in Ninjas)
      {
          if (ninja.Id == ninjaId)
              return ninja;
      }
      return null;
  }
  </code></pre>
  
  <p>This is suggested replaced with the following using LINQ: </p>
  
  <pre><code>private Ninja FindNinjaById(int ninjaId)
  {
      return Ninjas.FirstOrDefault(ninja =&gt; ninja.Id == ninjaId);
  }
  </code></pre>
  
  <p>This looks all fine, and I'm sure it's no problem regarding performance to replace this one foreach. But is it something I should do in general? Or might I run into performance problems with all these LINQ queries everywhere? </p>