Accepted answer
var employees = employeeList.Where(o => o.PastSalaries.Any(p => p < 35000));

The parameter to the delegate is now a double, not a Salary type with an Amount property, so you can compare on the parameter directly.


var employees = employeeList.Where(o => o.PastSalaries.Any(p=>p < 35000)); 

Try this. In first case your type is Salary and you check Amount field of that type. In this case you want to check double value ,so p<35000 will work properly.

Related Articles