The Route Constraints helps us to filter out or restrict the unwanted values from reaching the controller action. It does so by checking the Constraint against the value of the URL Parameter. For Example, you would want to Route engine to match a particular route only if int value is supplied for an URL parameter.
In this article, we will look at the Attribute Routing in ASP.NET Core Apps. We learnt the basics of Routing in the last tutorial. Routing is how ASP.NET Core matches an incoming URL to a controller action.
One of the most important parts of the MVC Architecture is the Routing engine. It is the Routing engine that decides to invoke controller for a particular request. In this Tutorial, we will look at How the Routing Works in ASP.NET Core app.
In this tutorial. We will introduce to you to the basic concepts of ASP.NET Core controllers. We will look at the controller action method and the return type from the Controller Action i.e Action Results.
In this tutorial, let us learn how to build an ASP.NET core MVC app from the scratch using Visual Studio. In the last article, we learnt what is MVC Design Pattern is and how it works in ASP.NET MVC Core applications. We continue to explore the MVC architecture and show you how to add the MVC Middleware to the App. Then we will show you how to add Controller, View and a Model to the ASP.NET MVC Core App.