[Solved] (C# Linq) Get items from a list when your ID is on another list [closed]


You need to do

var result = lista.Where(foo => foo.idinvoice == 1 && 
                                listaIDprod.Contains(foo.idprod)).ToList();

Please look into your code, before putting on SO. class objeto() should be class objeto.

Also, please choose sensible names for your classes and objects.

2

solved (C# Linq) Get items from a list when your ID is on another list [closed]