[Solved] LINQ with List


You want to use Any for that since l_obja is not a list of the ids.

List<ClassA> l_obja = Obj1.exp.Values.Where(i => i.Id == mid).ToList();
List<ClassB> l_objb = Obj1.Pol.Values.Where(i => l_obja.Any(a => a.MGId == i.GId));

solved LINQ with List