I’m late to the party but using the SearchExtensions nuget package you could do something like the following
var result = context.Data.Search(x => x.Name, x => x.Code).Containing(searchTerms);
This builds an expression tree so will still perform the query on the server (and not in memory) and will essentially run the SQL you desire above