Posted on: 4/17/2014 7:20:31 AM | Views : 450

Hi,
     I have a List<object> which have date field. I want to group them together by months and display it. So I used the following LINQ
List<obj> newsContents =//some values //group by month var monthlyGrouped = newsContents.GroupBy(x => new { x.EntryDate.Value.Year, x.EntryDate.Value.Month, x.EntryDate.Value.Day }); if i have values for jan, feb, mar, aug, dec... then i got the values grouped by that month only as below
Jan val1 val2 val3 Feb val1 val2 etc... But what i want is, even there is no record in a month, i need to display an empty month name specifying no records exist in this month. What tweak should i do in this LINQ?

Go to the complete details ...