title: How to do a case-insensitive string where in NHibernate Linq query?
body: <p>How to do a case-insensitive where in NHibernate  Linq query?</p>
  
  <p>e.g. </p>
  
  <pre><code>//note this one doesn't work if the entry in database has lowercase
  q =&gt; q.Where(entity =&gt; 
      entity.CaseInsensitiveField == DesiredField.Trim().ToUpper())
  </code></pre>