title: How do I append a 'where' clause using VB.NET and LINQ?
body: <p>I am pretty new to VB.NET and am having a bit of trouble here with something I thought should be simple.</p>
  
  <p>Keeping it simple, let's say I have a Document table with "Name" that I want to search on (in reality there are several other tables, joins, etc. ..). I need to be able to build the query using a <code>where</code> clause based on string values passed in.</p>
  
  <p>Example - the user may pass in "ABC", "ABC DEF", "ABC DEF GHI".</p>
  
  <p>The final query would be (the syntax is not correct, I know):</p>
  
  <pre><code>Select * from Documents Where Name Like %ABC% AND Name Like %DEF% AND Name like %GHI%
  </code></pre>
  
  <p>So, I thought I could do something like this.</p>
  
  <pre><code>Dim query = From document In _context.Documents
  
  &lt;&lt; loop based on number of strings passed in &gt;&gt;
  query = query.Where( ... what goes here?? )
  </code></pre>
  
  <p>For some reason, being brain-dead or something, I can't figure out how to make this work in VB.NET, or if I'm doing it correctly.</p>