O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

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

Building the Events Tab

We can now return to the EventController class and flesh out the Index action method and the associated view. Our goal is to display a table of event and ranking information, with links so that the user can edit or delete existing records or add new ones. We also need to allow the user to filter the set of events that are displayed based on the event type.

To begin, we need a view model object. I want to pass all the information needed for each row in the table in a single object, which means we need something to convey an Event domain model object and two values representing the personal rank and the reference rank. I created a new folder, Models/View, and added a new class called EventAndRankSummary. Listing 31-19 shows ...

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