title: EntityFrameWork Update Multiple Rows
body: <p>For example I have table like this</p>
  
  <p>Table<br/>
  ID -- CategotyID -- ProductName <br/> 1 --------- 4 ----------Coca-Cola <br/> 2 --------- 7 ----------Tea <br/> 3 --------- 4 ----------Sprite</p>
  
  <p>When I write in entityframework this code: <br/> <code>var list= db.Table.Where(w =&gt; w.CategotyID == 4).ToList();</code><br/><code>list.ForEach(update =&gt; update.ProductName = "Fanta");</code><br/><code>db.SaveChanges()</code><br/> I saw in SQL Profiler executes this statement separately like this<br/><code>update Table set ProductName = "Fanta" where ID = 1</code><br/><code>update Table set ProductName = "Fanta" where ID = 3</code></p>
  
  <p>How can I write from SQL to EntityFrameWork this statement?<br/><code>update Table set ProductName = "Fanta" where CategoryID = 4</code> <br/><br/><br/> Don't wont to SQL Server executes it separately</p>