Thank you for contacting us.
What you need is easily accomplished using Microsoft's Dynamic Query Library together with Open Access. There is a blog post discussing the topic here
What you need to do is add to your project the Microsoft's DynamicQuery NuGet package
. You can find it by searching for "DynamicQuery" or "Dynamic Expression Api" in the NuGet package manager.
I have prepared example for ordering some forum posts by "Id" or by "DateCreated":
Using context =
orderedForumPostsById = context.ForumPosts.OrderBy(
orderedForumPostsDateCreated = context.ForumPosts.OrderBy(
Please note the imported System.Linq.Dynamic namespace. You will need this because in it is the class holding the OrderBy extension method of IQueryable you need.
I hope you find this information helpful.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map