Book Image

ASP.NET Core 2 Fundamentals

By : Onur Gumus, Mugilan T. S. Ragupathi
Book Image

ASP.NET Core 2 Fundamentals

By: Onur Gumus, Mugilan T. S. Ragupathi

Overview of this book

The book sets the stage with an introduction to web applications and helps you build an understanding of the tried-and-true MVC architecture. You learn all about views, from what is the Razor view engine to tagging helpers. You gain insight into what models are, how to bind them, and how to migrate database using the correct model. As you get comfortable with the world of ASP.NET, you learn about validation and routing. You also learn the advanced concepts, such as designing Rest Buy (a RESTful shopping cart application), creating entities for it, and creating EF context and migrations. By the time you are done reading the book, you will be able to optimally use ASP.NET to develop, unit test, and deploy applications like a pro.
Table of Contents (14 chapters)

Chapter 6. Routing

Routing is one of the most important concepts in the ASP.NET MVC application as it takes care of incoming requests and maps them to the appropriate controller's actions.

We briefly discussed routing in Chapter 2, Controllers. In this chapter, we are going to discuss routing along with several options available for customizing it in ASP.NET Core.

By the end of this chapter, you will be able to:

  • Use the MapRoute method to configure routing
  • Work with different types of routing with examples—convention and attribute-based
  • Use HTTP verbs in attribute-based routing