Click here to Skip to main content
15,908,020 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Conventional-approach or, attribute based routing which one more appropriate. Can i use both routing in my application. Give me some idea about this.

Thanks

What I have tried:

Conventional-approach or, attribute based routing which one more appropriate. Can i use both routing in my application. Give me some idea about this.

Thanks
Posted
Updated 18-Jul-18 19:08pm

1 solution

Surely you can mix conventional or attribute based routing. It's typical to use conventional routes for controllers serving HTML pages for browsers, and attribute routing for controllers serving REST APIs. Having that said, and in my own opinion, Attribute routing is ideal for building REST API's.

Read on: Routing in ASP.NET Core | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900