title: Update records using LINQ
body: <p>I need to set a value in a table for a subset of rows. In SQL, I would do this:</p>
  
  <pre><code>UPDATE dbo.Person SET is_default = 0 WHERE person_id = 5
  </code></pre>
  
  <p>Is there a way to do this in LINQ?</p>
  
  <p>I currently use the:</p>
  
  <pre><code>var result = (from p in Context.People....)
  </code></pre>
  
  <p>notation.</p>
  
  <p>Is there an update method I can use? Or do I have to get all the records, then update them one-by-one in a Foreach?</p>
  
  <p>Is this the most efficient way, if this is even possible?</p>
  
  <pre><code>(from p in Context.person_account_portfolio where p.person_id == personId select p)
     .ToList()
     .ForEach(
         x =&gt;
         x.is_default =
         false);
  </code></pre>