Skip to content

Instantly share code, notes, and snippets.

@bradoyler
Created December 12, 2012 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradoyler/4269238 to your computer and use it in GitHub Desktop.
Save bradoyler/4269238 to your computer and use it in GitHub Desktop.
Joining a table to a large List<int> using LINQ
List<int> contactIds=MyContactIds() //count of contactIds is more than 2100 rows
var profiles = db.Profiles.AsEnumerable()
.Join(contactIds, p => p.ContactId, ci => ci, (p, ci) => p)
.ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment