I have following query but it displays only limited months.
Say (10 and 11). It doesn't show all months. I want to get missing Month with zero for a current year and total.
The query is
var monthlySalesList = context.Bids.Include(r => r.AllRequest)
.ThenInclude(r => r.Category)
.Where(b => b.UID== UID && (b.Status == MyStatus.Awarded || b.Status == MyStatus.Completed))
.GroupBy(a => new { Month =a.InsertedDate.Month })
.Select(g => new MyServiceList()
{
Key = g.Key.ToString(),
Month = g.Key.Month.ToString(),
Total= g.Sum(s => s.totalBudget)
}).ToList();