31ASP.NET Core MVC

SETTING UP SERVICES FOR ASP.NET CORE MVC

Chapter 30, “ASP.NET Core,” showed you the foundation of ASP.NET Core with dependency injection and middleware. This chapter makes use of dependency injection by injecting ASP.NET Core MVC services.

ASP.NET Core MVC is based on the MVC (Model-View-Controller) pattern. As shown in Figure 31-1, this standard pattern (a pattern documented in Design Patterns: Elements of Reusable Object-Oriented Software book by the Gang of Four [Addison-Wesley Professional, 1994]) defines a model that implements data entities and data access, a view that represents the information shown to the user, and a controller that makes use of the model and sends data to the view. The controller receives a request from the browser and returns a response. To build the response, ...

Get Professional C# 7 and .NET Core 2.0, 7th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.