Hi can you guys help me with this, I have try several things.
I need to search between two IEnumerables, here is the code.
IEnumerable<Project> Projects = new[] { new Project {id = "1", lan = "test1"}, new Project {id = "2", lan = "test1"}}
IEnumerable<string> lan = new [] { "test1", "test2"};
IEnumerable<string> indexFiltered = ?;
I need to do a linq query that return the Project.id thats have any Project.lan in lan.
Any idea?
Another efficient approach is using
Enumerable.Joinsince it’s implemented as a hash table:Why is LINQ JOIN so much faster than linking with WHERE?
The Join operator takes the rows from the first tables, then takes only the rows with a matching key from the second table, then only the rows with a matching key from the third table.