A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
Something like this ?
var query = Orders
.Where(x => x.OrderDateTime.Year == year && x.Status == status)
.GroupBy(x => new { Month = x.OrderDateTime.Month })
.Select(u => new
{
Month = u.Key.Month,
Status = status,
Count = u.Count()
})
.OrderBy(u => u.Month);