I want Linq to return an array. In order to plot the graph.
Here is my code
var orders = _uow.Orders.GetAll()
.Where(x => x.Created > baselineDate)
.GroupBy(x => x.Created.Day)
.Select(c => new {Day = c.Key, Total = c.Sum(t => t.Total)})
.ToList();
Now it returns this
[{"Day":3,"Total":9999.00},{"Day":4,"Total":9999.00},{"Day":5,"Total":9999.00}]
BUT I want a result of
{"Day":[3,4,5], "Total":[9999, 9999, 9999]}
this result is easier to plot the graph.
Thank you all