skip to Main Content

Welcome

Say hello to the toggle bar. This is an optional section you can use to display any content you'd like. Simply select a page from the theme panel and the content of the page will display here. You can even use the drag and drop builder to create this! This is a perfect place for your company mission statement, alerts, notices or anything else.

Get In Touch

Email: support@total.com
Phone: 1-800-Total-Theme
Address: Las Vegas, Nevada

Our Location

togglebar-map

[Performance] Attribute routing vs Conventional routing

Post Series: ASP.NET Core Security

What distinguishes the two types of routing systems is the process applied after a URL matches a route template. In conventional routing, the route values from the match are used to choose the action and controller from a lookup table of all conventional routed actions. In attribute routing, each template is already associated with an action, and no further lookup is needed.

Advantages of an Attribute Routing

  • Endpoint can be customized in its own format.
  • Endpoint can be understand easily for the user.
  • Best practice with WebAPI.
  • Easy for maintenance purpose.
  • Endpoint looks clean and clear.
  • Endpoint will be seprate for all actions.

Implement

Resource

https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/routing#mixed-routing-attribute-routing-vs-conventional-routing

https://stackoverflow.com/questions/42461932/attribute-based-routing-vs-convention-based-routing-best-practice-for-asp-net

http://www.c-sharpcorner.com/article/attribute-based-routing-in-asp-net-web-api-and-mvc-4/

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top