title: Entity Framework - case insensitive Contains?
body: <p>I want a solution to this problem that does not involve ToUpper or ToLower, as I use in the code below;</p>
  
  <pre><code>var upper = term.ToUpper();
  using (var db = this.DataContext)
  {
      return db.Counties.Where(x =&gt; x.CountyName.ToUpper().Contains(upper)).ToList();
  }
  </code></pre>
  
  <p>I am using entitly framework so the C# solution of using <code>StringComparison.CurrentCultureIgnoreCase</code> does not work. It does work for <code>Equals</code>, <code>EndsWith</code> and <code>StartsWith</code>, but not <code>Contains</code>.</p>