title: Using 'Contains' Clause Like 'IN' SQL Clause in Entity Framework
body: <p>I am working on a tag cloud application. There are 3 database tables.</p>
  
  <p><strong>Content</strong>: ContentID, Text</p>
  
  <p><strong>Tag</strong>: TagID, Name</p>
  
  <p><strong>TagRelation</strong>: TagRelationID, TagID, ContentID</p>
  
  <p>The code below is wrong. Because 'Contains' clause doesn't take a list of parameters like the 'IN' SQL clause. Is there an alternative clause that I can use to make this code work?</p>
  
  <pre><code>        public List&lt;Content&gt; GetTagArticles(String tagName)
      {
          var relations = db.TagRelation.Where(t =&gt; t.Tag.Name == tagName).ToList();
  
          var contents = db.Content.Where(c =&gt; c.TagRelation.Contains(relations)).ToList();
  
  
  
          return contents.ToList();
  
      }
  </code></pre>