CHAPTER 4
ASP.NET MVC Controllers
“Well, everybody does it that way, Huck.“
“Tom, I am not everybody.“
—Mark Twain, “The Adventures of Tom Sawyer”
Despite the explicit reference to the Model-View-Controller pattern in the name, the ASP.NET MVC application model is essentially centered on one pillar—the controller. The controller governs the entire processing of a request. It captures input data, orchestrates the activity of business and data layers, and finally wraps up raw data computed for the request into a valid response for the caller.
Any request that passes the URL routing filter is mapped to a controller class and served by executing a given method on the class. Therefore, the controller class is the place where developers write the actual ...
Get Programming ASP.NET Core, First edition 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.