title: Query and updating a property in a collection using LINQ
body: <p>What is the most succint/simple way of updating a single property of a specific item within a collection using LINQ?</p>
  
  <p>For example if I have a List of the following:</p>
  
  <pre><code>public class Ticket
  {
      public string Name { get; set; }
      public string Code { get; set; }
      public bool Selected { get; set; }
  }
  </code></pre>
  
  <p>How can I use LINQ to update the "Selected" property of a Ticket item wheres its "Name" property has the value of "Beach". In SQL it would be:</p>
  
  <pre><code>UPDATE Tickets SET Selected = true WHERE Name = 'Beach'
  </code></pre>
  
  <p>I thought I was on the right track with this...</p>
  
  <pre><code>tickets.Select(x =&gt; { x.Selected = true; return x; }).ToList().Where(x =&gt; x.Name == "Beach");
  </code></pre>