title: Linq: Convert list of object to dictionary, with an object member as value
body: <p>I have a class like:</p>
  
  <pre><code>public class ContainerClass
  {
      public guid Group { get; set; }
      public int Value { get; set; }
  }
  </code></pre>
  
  <p>contained in:</p>
  
  <pre><code>IEnumerable&lt;ContainerClass&gt;
  </code></pre>
  
  <p>How do I convert it to the following dictionary?</p>
  
  <pre><code>Dictionary&lt;guid, List&lt;int&gt;&gt;
  </code></pre>
  
  <p>I've looked at similar questions (eg. 
  <a href="https://stackoverflow.com/questions/938040/what-linq-statement-to-create-a-dictionary-on-a-list-with-group">Create a dictionary on a list with grouping</a>) but that goes to <code>Dictionary&lt;guid, List&lt;ContainerClass&gt;&gt;</code> which is different from what I'd like. </p>
  
  <p>I know I can do a secondary linq query to just get the value entries after I have an IEnumerable but that seems messy; it seems like there should be a way to do this directly in a single statement.</p>
  
  <p>Edit: Note, I'm aware of Lookup(), but in this case, I am actually doing bulk processing by Group, so I really do need the Dictionary (or something where each group has a collection of Values). In this case, each Group is being sent to a resource, and I want to send all the values for that resource in bulk: if I have 10 groups, with 50 values each (500 entries in my List total), I want to make 10 calls.</p>