Code: Select all
var reportData = (from pr in db.PageReports
where pr.CampaignID == 594
group pr by pr.DeviceID into g
select new
{
DeviceID = g.Key,
DeviceCount = g.Count(),
Device = (from d in db.Devices
where d.DeviceID == g.Key
select d)
});
var finalData = reportData.OrderByDescending(s => s.DeviceCount);
"Expression of type 'System.Decimal' cannot be used for constructor parameter of type 'System.Nullable`1[System.Decimal]'"
Thanks for the help.