π Challenge: Implement Action Method with View
Use your knowledge to write action methods and views that return a list of active and inactive users.
We'll cover the following
Requirements
As of right now, your application returns a list of users that are both active and inactive. You need to refine it, and only return users that are active on the main page. You also want to keep tabs on users that are inactive. For that purpose, you need to implement a new page that only returns inactive users.
You also need to make sure that in both lists, the names being returned are in alphabetical order.
Code widget
Provided below is the code widget. Implement the requirements given above in the widget. An action method InActive()
has been defined in UsersController.cs
which returns an empty view. A view called InActive.cshtml
is also present that needs to be modified to show a list of inactive users.
The solution to this challenge can be found in the next lesson. Good luck! π
Get hands-on with 1200+ tech skills courses.