using System.Collections.Generic;
public class ProjectResult
public string Month { get; set; }
public string Name { get; set; }
public class DynamicProjectCalendarAug
public int GroupRowId { get; set; }
public string MonthYear { get; set; }
public string ProjectName { get; set; }
public override string ToString() => $"{GroupRowId} | {MonthYear} | {ProjectName}";
public static void Main()
List<ProjectResult> result = new()
new() { Month = "2020-08", Name = "Project 1"},
new() { Month = "2020-08", Name = "Project 2"},
new() { Month = "2020-08", Name = "Project 3"},
new() { Month = "2021-08", Name = "Project 4"},
new() { Month = "2021-08", Name = "Project 5"},
new() { Month = "2021-08", Name = "Project 6"}
.GroupBy(resultItem => resultItem.Month,
( _, itemsInMonth ) => itemsInMonth
.Select(( item, i ) => new DynamicProjectCalendarAug {
Console.WriteLine(string.Join(Environment.NewLine, queryAug));