I wanted to have a replacement for the OData package in dotnet core, since I was only using the $select part of it.
I've asekd the question on StackOverflow https://stackoverflow.com/questions/58836295/create-a-dynamic-linq-statement and got a great answer.
Below is the Generic version of the code provided in the answer.