I have this object
With Fecha="Julio2017" I have 2 items and I need to group these three items by SubcontratistaId and Fecha.
item1.Realizado=4060.000 and item2.Realizado=-4060.000 So I need to show in Julio2017 the value of 0
So I try this
private IEnumerable<SubcontratacionesEnFecha> GetRealizadosEnFecha(string proyectoId)
.....
return realizadosAbonadosEnFechaAcumulados
.GroupBy(x => new { x.SubcontratistaId, x.Fecha })
But now I don't know how to get the values of all the items grouped
If I try this
return realizadosAbonadosEnFechaAcumulados
.GroupBy(x => new { x.SubcontratistaId, x.Fecha })
.Select(x=>x.First())
.ToList();
I get this
That is, I get the first value of the items grouped
Any idea Please?
Thanks
I Found this way