Chapter 1, Setting the Stage, begins with explaining the fundamental concepts about web applications—HTTP, client side, and server side. It also discusses the three programming models of ASP.NET MVC. Finally, it provides simple and easy-to-follow step-by-step instructions to set up an ASP.NET Core Web Application project and project structure.
Chapter 2, Controllers, explains the role of the controller in ASP.NET MVC applications. It also details the procedure of creating a controller and action methods. It also describes how to make modifications to the controller, such that it uses the view. Finally, it describes how to add a model and pass that model data to your view.
Chapter 3, Views, is more hands-on in nature as it teaches how to program in the Razor view engine and use different programming constructs. It also explains in depth how to create and call partial views, create a view component, and create custom Tag Helpers.
Chapter 4, Models, explains how models in ASP.NET MVC are used to represent the business domain data. It begins by explaining how to create a simple model and a model specific to ViewModel. It then provides the step-by-step guidance on how to use Entity Framework in ASP.NET MVC applications.Â
Chapter 5, Validation, describes the importance of validating the input data before storing the data for further processing. It begins with a brief explanation of the different types of validation. Moves on to explain how to perform both client-side and server-side validations by using an example. Finally, it covers how to use jQuery libraries to perform unobtrusive JavaScript validation.
Chapter 6, Routing, discusses routing along with several options available for customizing it in ASP.NET. Firstly, it teaches how to configure routing using MapRoute. It then, through examples, teaches how to work with different types of routing.
Chapter 7, Rest Buy, details the development of a simple shopping cart application called Rest Buy. As with how most projects begin, it discusses the design of Rest Buy. Then, it moves on to discuss the entities for the application. Finally, it deals with EF context and migrations.
Chapter 8, Adding Features, Testing, and Deployment, is built around adding the registration feature to our application and testing and deploying it to the cloud. It, therefore, deals with writing unit tests and upgrading it to Bootstrap 4. It also details how to deploy our application to Azure.