Reputation: 61
What would be the best way to join the IEnumerable list with IQueryable.
I already saw this link which talks about it. But I want to know if someone had tried something different. Which wont hinder on performace as i would have huge dataset.
https://ilmatte.wordpress.com/2013/01/06/entity-framework-joining-in-memory-data-with-dbset/
Upvotes: 0
Views: 3133
Reputation: 26907
When you have a large IEnumerable
and want to join on a database, and the data is too much to embed in a query using Contains
or something like that extension, I would suggest add a table to your database, uploading the IEnumerable
into the table, and then doing the join on the database.
But if the IEnumerable
is much larger than the IQueryable
, just filter the IQueryable
as much as possible on the database side and then use AsEnumerable
to pull it into memory and join there.
Upvotes: 2