title: Dynamic clause where in Linq to Datatable
body: <p>I have a query that select some rows from datatable,but the clause <code>where</code> is concatenated according to many test, bellow what i have tried but he didn't work :</p>
  <pre><code>Dim queryArchi = (From b In DataBien.AsEnumerable()
      Group b By b!nom_ville, b!Designation_projet, b!code_ville, b!code_projet Into Group
       Select nom_ville, Designation_projet,code_ville, code_projet, NBP = Group.Count())
  
        If vil &lt;&gt; &quot;&quot; Then queryArchi = queryArchi.Where(Function(d) d.code_ville = vil) 
        If p &gt; 0 Then queryArchi.Where(Function(d)  d.code_projet.Equals(p))                    
             queryStructure = queryArchi.ToList
  </code></pre>
  <p>Only the first test is working :</p>
  <pre><code>   If vil &lt;&gt; &quot;&quot; Then queryArchi = queryArchi.Where(Function(d) d.code_ville = vil)
  </code></pre>