Sorting
Sorting is easy to implement. You filter object just should inherit from OrderableFilterBase.
After you inherit, OrderableFilterBase applies query
and sorting
when you call ApplyFilter method.
Showcase
Implementation
You just need to create a Filter object that includes properties which is able to filter.
Usage
Now your querystring has 2 more parameter. sort
and sortBy
.
/books?sort=Title
/books?sort=Title&sortBy=Ascending
/books?sort=Title&sortBy=Descending