What is your DbContext, OrderWithColorsQuantitiesViewModel and other models' structure, it will cause some difficult to reproduce the issue.
Depend on the sum code you offered, you can try this first:
var SUM = ResultList.Select(a => a.colors.Select(m => m.Quant.Sum(q => q.Values)));
Best Regards,
Jerry Cai
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
Participant
1110 Points
371 Posts
Re: Question about item count in a result
Feb 24, 2021 08:25 AM|Jerry Cai|LINK
Hi,MiguelMi
What is your DbContext, OrderWithColorsQuantitiesViewModel and other models' structure, it will cause some difficult to reproduce the issue.
Depend on the sum code you offered, you can try this first:
Best Regards,
Jerry Cai