If you ever wondered how you could dynamically filter and/or sort your queries without having to write a huge switch statement with all the possible properties and operations, you’ve come to the right place!

Today we’ll see how we can generate these types of operations at runtime and on the fly. I have packaged everything in this NuGet package, it’s code is available in this GitHub repository.

For the sake of this blog post, let’s assume that we’re building an E-Commerce website.

#programming-c #csharp

Dynamic Sorting and Filtering in C#
1.50 GEEK