title: Update datatable with In condition using LINQ
body: <p>I have a data table. Value of a column needs to populated using constant and value of other column only if the condition is satisfied.</p>
  
  <p>Below would do for SQL Server.</p>
  
  <pre><code>UPDATE table SET ColumnA = 'MyValue.' + ID WHERE SOURCE IN ('1', '2')
  </code></pre>
  
  <p><strong>How do I achieve the same using LINQ in C# ?</strong></p>
  
  <p>I can do something like this, but that will keep my where clause extending. </p>
  
  <pre><code>var results = from myRow in table.AsEnumerable()
  where myRow.Field&lt;int&gt;("SOURCE ") == 1 or myRow.Field&lt;int&gt;("SOURCE ") == 2
  select myRow;
  
  foreach (DataRow Row in results.Rows)
      Row["ColumnA"] = 'MyValue.' + Row["ID"] ;
  </code></pre>