This code isn't actually going to be doing a linear search through the list. It's not going to be doing any of the filtering in the application at all. This code is going to be translated into SQL and then performed at the database, which will be responsible for optimizing the query itself.
Were you to be doing this filtering within your application then yes, you'd want to use a HashSet
that could be much more efficiently searched, but you aren't, so it's not relevant.
What you have is fine, so long as the query provider succeeds in translating the query.