O'Reilly logo

Hands-On Design Patterns with C# and .NET Core by Jeffrey Chilberto, Gaurav Aroraa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting inventory with a filter, paging, and sorting

As per our business requirements, we need to apply a filter, paging, and sorting to our FlixOne inventory application. First, let's start implementing the sorting. To do so, I've created a project and put this project in the FlixOneWebExtended folder. Start Visual Studio and open the FlixOne solution. We will apply to sort to our product listing sheet for these columns: Category, productName, Description, and Price. Please note that we will not be using any external component for sorting, but we will create our own login.

Open the Solution Explorer, and open ProductController, which is available in the Controllers folder. Add the [FromQuery]Sort sort parameter to the Index method. Please ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required