Instead of filtering Expenses by dates, how could we implement a Category drop down?

Dec 28, 2012 at 10:17 PM

I have a custom entity having a Category lookup field just like how the expense entity has a Category field. In the Index view for my custom entity, I would like to place a filter at the top of the page just like how the Expense Index view allows the user to filter by start date and end date. However, I want the user to be able to filter the list by selecting a Category from a drop down list.

Consider that I am new to MVC.

THANKS!

Dec 29, 2012 at 12:07 AM

Would I want to modify Index.cshtml to use the viewmodel instead of the model? Wouldn't I always want use a view model as the model for my pages?