1
I have no idea how to get the Total value = 755.00 of that select with Linq ?
| ID |Qtde | Valor | Total |
| 1 | 10 | 23.00 | 230.00|
| 1 | 15 | 10.00 | 150.00|
| 1 | 15 | 25.00 | 375.00|
Total: 755.00
I imagine something like:
var _total = from cta in ListConta()
.Where(c => c.ContaID == pContaID)
select new ContaView
{
ContaID = cta.ContaID ,
Qtde = cta.Qtde,
ValorTotal = cta.Pedido.ItensPedido.Sum(c => c.Valor)
};
perfect! Thank you!
– hard123