title: Perform mutable updates in LINQ query?
body: <p>I have a LINQ query where I want to return modified objects. If I were in an immutable Functional mood, I might do something copy-construtor-like, like this:</p>
  
  <pre><code>from widget in widgets select new widget { legs = widget.legs + 1, arms = widget.arms }
  </code></pre>
  
  <p>Sadly, I'm doing this on a mutable NHibernate entity object and I have to modify the original object. I'm looking for some syntax with a little anonymous method with side-effects, like:</p>
  
  <pre><code>from widget in widgets select { widget.legs += 1; return widget }
  </code></pre>
  
  <p>(with apologies to Scala syntax)</p>
  
  <p>Now, I can perform this update outside the LINQ query, but I'd rather do it inline, if I can. Is it possible to insert <code>void</code> operations such as this in LINQ?</p>