title: How to perform a Like type query using WhereParameters and EntityDataSource
body: <p>In the code-behind I want to apply a dynamic where clause for the entitydatasource, but I want this where to be like and not equal.  I have this code working which is equal I want an equivalence code that somehow translates this into a Like statement.</p>
  
  <pre><code>EntityDataSource1.WhereParameters.Add("Name", TypeCode.String, tbxSearch.Text);
  </code></pre>
  
  <p>Solution after reading Jupaol comment :</p>
  
  <p>Xaml:</p>
  
  <pre><code>&lt;WhereParameters&gt;
     &lt;asp:ControlParameter ControlID="tbxSearch" Name="Name" Type="String" /&gt;
  &lt;/WhereParameters&gt;
  </code></pre>
  
  <p>Code Behind: (on load event)</p>
  
  <pre><code>if (string.IsNullOrEmpty(tbxSearch.Text))
  {
     this.EntityDataSource1.Where = "1=1";  //fetch all data if empty
  }
  else
  {
     this.EntityDataSource1.Where = "it.Name like '%' + @Name + '%'"; //filter
  }
  </code></pre>