Say I have this structure:
public class Car
{
public string Name;
public IList<Tire> Tires;
}
public class Tire
{
public string Name;
public int Size;
}
I want a query to return all Cars that have Tires with size 40.
I am thinking this way, what am I missing?
Cars.Where(x => x.Tires.Where(y => y.Size == 40));
This code throws this error: "Cannot convert lambda expression to delegate type 'System.Func' because some of the return types in the block are not implicitly convertible to the delegate return type"