title: LINQ To Entities Contains Case In-Sensitive Searching
body: <p>i am trying to query my resultset like this in linq to entities;</p>
  
  <pre><code>var categoriesList = _catRepo.GetAllCategories();
  
  
   filteredCategories = categoriesList.Where(c=&gt; c.CategoryName.Contains("for"));
  </code></pre>
  
  <p>However, i don't get any result becuase the <code>CategoryName</code> is <code>For(Upper Case)</code> in the database. I have also checked the sql server collation and it is set to <strong>_CI_AS</strong>. I have no idea <strong>how to use contains to filter case insensitive string?</strong>
  I want basically if someone type like;</p>
  
  <pre><code> filteredCategories = categoriesList.Where(c=&gt; c.CategoryName.Contains("for"));
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>filteredCategories = categoriesList.Where(c=&gt; c.CategoryName.Contains("For"));
  </code></pre>
  
  <p>The result should be the same</p>