Is there any performance increase converting search term to lower case before LINQ Please have a look at the following 2 snippets:

var query = _ctx.Notes.Where(...);    
var searchLower = searchTerms.ToLower();
query = query.Where(a =&gt; a.Comment.ToLower().Contains(searchLower))


vs

var query = _ctx.Notes.Where(...);        
query = query.Where(a =&gt; a.Comment.ToLower().Contains(searchTerms.ToLower()))


Is there any peformance increase by converting the search terms before carrying out the LINQ query?
Instead of Contains(), use IndexOf() which takes a comparer:

var query = _ctx.Notes.Where(...);        
query = query.Where(a =&gt; a.Comment.IndexOf(searchTerms, StringComparison.OrdinalIgnoreCase) &gt;= 0)