Is there a method to determine if an IQueryable object's expression tree has an OrderBy?
I have a grid control that allows for paging and column-by-column sorting. However, there is no default sort applied, therefore in this instance Linq to SQL does an exorbitantly large select for the number of rows. I must always supply an order by, but I should only do so if no other order has been supplied.
Is that so then?
Using a customized tool, you may examine the query's expression tree to learn more.
or any preferred method of recursive traversal.
Your code seems to be poorly constructed, in my opinion. You should definitely merely keep a record of the fact that an order has been placed someplace.
. Perhaps your app's information architecture has to be changed.
You are shadily obtaining this information using this inspection technique.