title: Linq IEnumerable<IGrouping<string, Class>> back to List<Class>
body: <p>How can I turn the following statement back to <code>List&lt;DocumentData&gt;</code></p>
  
  <pre><code>IEnumerable&lt;IGrouping&lt;string, DocumentData&gt;&gt; documents = 
                   documentCollection.Select(d =&gt; d).GroupBy(g =&gt; g.FileName);
  </code></pre>
  
  <p>the goal is to get List that should be smaller than documentCollection.
  FileName contains duplicates so I want to make sure I don't have duplicate names.</p>
  
  <p>I have also tried the following but it's still providing me with duplicate file names</p>
  
  <pre><code>documentCollection = 
      documentCollection.GroupBy(g =&gt; g.FileName).SelectMany(d =&gt; d).ToList();
  </code></pre>