I have a ListaBid
class with multiple objects, in this class there are attributes Partnumber(Chave)
, Quantidade
SaldoPartnumber
.
I can have X objects with partnumber
Y and other X objects with% co_of% Z
I would like to sum the SaldoPartnumber attribute of all items that have the value of Partnumber
.
var itensPedido = (from l in listaBID
select new Pedido.sItemPedido
{
CodigoProduto = l.Partnumber,
SaldoPartnumberSap = l.SaldoPartnumberSap,
Saldo = l.Saldo,
}).ToList();