I have a string[]
of unique words and an IQueryable<>
of a unique class, which contains a string. I'd like to remove all items from the IQueryable<>
whose string variable does not contain one of the unique words. How can I do this in a way that will not be a serious drain on my code at runtime?
One of the variables is string Name
. I have an IQueryable<Project>
and a string[] words
. I'd like to create a new IQueryable<Project>
where all of the Project's Name contains at least one of the words in the words array.
I don't know how exactly how to do this without looping through the IQueryable
twice (once to mark the Projects
that have a Name
containing a word in the array, and again to move those Projects
into a new IQueryable
) which for a large IQueryable
would be a serious time strain.