Quantcast
Channel: Best practice to implement a sort property - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Yared for Best practice to implement a sort property

Use the following method to achieve flexible sorting. The method requires property name and sorting direction parameters. public Func<IQueryable<T>, IOrderedQueryable<T>>...

View Article



Best practice to implement a sort property

I have an api Get method which accepts sort property as a string. What is a best solution to handle it without using switch statement? public ActionResult Index(string sortOrder) { var students = from...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images