Over on his blog, Adam Anderson posted a very nice helper class that allows you to use SQL-Like Sort Expressions in LINQ. I have found this to be invaluable in a number of projects and I am simply reposting his code in the hope others will find it useful.

Example Usage:

Helper Class (I just named mine OrderByHelper.cs in my projects):

Thanks Adam!

Source


Pin It on Pinterest

Share This
%d bloggers like this: