Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Defining multiple routes in Asp.Net Core MVC

In the previous post we saw about Routing in Asp.Net Core MVC Applications, also we saw different ways of defining simple routing. However for more complex application this simple routing might not be enough, we might have to define different routing paths for each module in the application like

/Accounts/. . .
/Contacts/. . .
/Reports/. . .

In this post we shall see on how to define multiple routing paths in Asp.Net Core MVC.

Remember we defined a simple routing which by default was pointing to Home/Index, let us extend this by adding 2 more paths to this routing pointing to the Employee & Users controller, the route definition will be as follows.


This post first appeared on C# Guide, please read the originial post: here

Share the post

Defining multiple routes in Asp.Net Core MVC

×

Subscribe to C# Guide

Get updates delivered right to your inbox!

Thank you for your subscription

×