My knowledge of Lambda expressions is a bit shaky, while I can write code that uses Lambda expressions (aka LINQ), I\'m trying to write my own method that takes a few arguments
There's no such type as "lambda expression". A lambda expression can either be converted into a compatible delegate type, or an expression tree.
Your existing method signature uses expression trees - but it's not at all clear that it really needs to. Try the delegate form (with a few parameter name changes):
public static IList<TreeItem> GetTreeFromObject<T>(IList<T> items,
Func<T, string> idSelector,
Func<T, string> textSelector,
Func<T, IList<T>> childPropertySelector) where T : class
Then you can do something like this:
foreach (T item in items)
{
string id = idSelector(item);
string text = textSelector(item);
IList<T> children = childPropertySelector(item);
// Do whatever you need here
}