After upgrading to ef core 3.0. i am having issues with grouping my results. If i remove the grouping section it works fine. But of course i need to get a sum of the amount so need it.
IQueryable<ShackGapiModel> models = _context.Offers
.Where(i => i.Amount > 0)
.Select(o => new ShackGapiModel
{
Id = o.Shack.Id,
Title = o.Shack.Title,
AmountOnExchange = o.Amount
})
.GroupBy(i => i.Id)
.Select(s => new ShackGapiModel
{
Id = s.First().Id,
Title = s.First().Title,
AmountOnExchange = s.Sum(a => a.AmountOnExchange)
});