linq order by dynamic code example Example: linq dynamic order by descending myDataSource.OrderBy(columnName + " descending");