<p>I am trying to get the signature on the method below to work. As this is an Anonymous Type I have some trouble, any help would be great.</p>

<p>When I looked at sortedGameList.ToList() in a QuickWatch window I get the signature </p>

<pre><code>System.Collections.Generic.List&lt;&lt;&gt;f__AnonymousType0&lt;System.DateTime,System.Linq.IGrouping&lt;System.DateTime,DC.FootballLeague.Web.Models.Game&gt;&gt;&gt;
</code></pre>

<p>Many Thanks</p>

<p>Donald</p>

<pre><code>   public List&lt;IGrouping&lt;DateTime, Game&gt;&gt; getGamesList(int leagueID)
{
    var sortedGameList =
        from g in Games
        group g by g.Date into s
        select new { Date = s.Key, Games = s };

    return sortedGameList.ToList();

}
</code></pre>

The simple answer is: don't use an anonymous type.
The closest you're going get with that anonymous type is IEnumerable<object>. The problem is, anybody who uses your stuff is not going to know what to do with that object whose type was "unpredictable".
Instead, make a class like:
```
```
public class GamesWithDate {
    public DateTime Date { get; set; }
    public List<Game> Games { get; set; }
}
```
```
And change your LINQ to:
```
```
var sortedGameList =
    from g in Games
    group g by g.Date into s
    select new GamesWithDate { Date = s.Key, Games = s };
```
```
Now you're returning List<GamesWithDate>.