Couple posts ago I said “It took me a minute to figure out how this works. I thought it was somehow in need of the property name to order by, but in reality it is looking for a list of strings to order by.” when I was talking about how to create an order by expression. I thought about it more, and that doesn’t make sense as far as the sql goes. What I was saying would mean it would get the list of strings and sort based on them. What I think actually happens is it takes the Expression (Hense the name) and derives the order by from the epression.

Say I want tell the thing I will want to sort by user.UserName, it will take that expression and translate it into ORDER BY someAlias.UserName. Magic. I would like to know how it does this. Reflection and a ton of it I would assume.