Chapter 9. Controllers and Actions

Each time a request comes in to your ASP.NET MVC application, it's dealt with by a controller. The controller is the boss: it can do anything it likes to service that request. It can issue any set of commands to the underlying model tier or database, and it can choose to render any view back to the visitor. It's a .NET class into which you can add any logic needed to handle the request.

In this chapter, you'll get familiar with all the most frequently used capabilities of controllers. We'll start with a quick discussion of the relevant architectural principles, and then look at your options for receiving input and producing output, and how it all fits neatly with unit testing. This knowledge will prepare you for ...

Get Pro ASP.NET MVC 2 Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.