score:3

Accepted answer

Why not put that query inside a generic method?

MyBase Get<T>(IEnumerable<T> list) where T : MyBase
{
    MyBase testItem = from x in list
                      from y in x.SolidItems
                      where y.Classified == otherObject.Classified 
                      select x;
    return testItem;
}

You could call it like this:

var result1 = Get(AbcTransport);
var result2 = Get(DefTransport);

Related Articles