Difference between WebApiConfig.cs and RouteConfig.cs

后端 未结 3 1332
长情又很酷
长情又很酷 2021-02-11 13:28

What is the difference between WebApiConfig.cs and RouteConfig.cs in the App_Start folder of an MVC Web API project in Visual Studio 2012?

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-11 14:05

    There is no difference as they both accomplish the same thing - adding routes to your route collection. You don't need to use the WebApiConfig class; it's simply a convenient way to organize your code.

提交回复
热议问题