Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: None  |  size: 0.18 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Most Efficient Many-To-Many Linq Query
  2. List<string> tagNames = ...;
  3. var questions = db.Questions.Where(
  4.      q => q.QuestionTags.Any(
  5.           qt => tagNames.Contains(qt.Name)));