Routing in ASP.NET Web API 2 - Attribute Routing - Tutorial NO. 03
In this post i will explain basics about Routing in ASP.NET Web API. Convention-Based Routing Attribute-Based Routing Other than Web API, Web API 2 support new new routing call Attribute routing. It will give you more control over URIs in Web API. Download out previous Code Sample in Here . For previous tutorials : Create Simple Web API 2 Project in few minutes - .NET Framework - Tutorial NO. 01 Using Postman and Inspect tool in Google Chrome to Test your Web API - Tutorial NO. 02 Convention-based routing is still available in your API (Earlier method). You can still choose what you want or you can use both method inside your project. Difference between Convention-based routing and Attribute-routing In Convention-based routing you define one/more routeing templates, are basically parameterized strings. But advantage of the Convention-based routing is only define in singe place. WebApiConfig.cs file in App_Start folder. Convention-based ro...