title: Declaring list with anonymous type
body: <p>I am trying to declare list which has anonymous type in it. I have tried to assign list value to null and also tried to assign list to new entity list but it shows error. Any pointers?</p>
  
  <pre><code>var finalEntries = new List&lt;MyDbTableEntity&gt;();
  
  var groupedItemList = _context.MyDbTableEntity
                        .Select(k =&gt; new { name = k.name.ToString(), data = k.info.ToString() })
                        .GroupBy(k =&gt; k.name)
                        .ToList();
  
  finalEntries.AddRange(groupedItemList);
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>cannot convert from 
  'System.Collections.Generic.List&lt;System.Linq.IGrouping&lt;string, &lt;anonymous type: string name, string data&gt;&gt;&gt;' 
  to 
  'System.Collections.Generic.IEnumerable&lt;MyDbTableEntity&gt;'
  </code></pre>