1
Very well, I will try to be as clear as possible. I have the stock table where will have there several products -> Productoid and its Quantity. In the same table the product can be repeated with a different quantity, in my current code I can only take the first quantity in the table but I can’t take the other and add the two. use Entity framework using lambda.
Estoque estoque = db.Estoque.Where(x => x.ProdutoId == model.ProdutoId).FirstOrDefault();
int qtdEstoque = estoque.Quantidade;
Returns =10 and had to be Quantity = 30
Thanks, that’s exactly what I needed, I had managed to do using an ugly gambiara here, but your code got cleaner.vlw
– Cesar Augusto