How do I set the default namespaces in MapHttpRoute?

后端 未结 5 430
没有蜡笔的小新
没有蜡笔的小新 2020-12-25 10:57

With the standard MapRoute method a can pass a string collection representing the namespaces in which to search for my controller. This seems to have disappeared from MapHtt

5条回答
  •  时光取名叫无心
    2020-12-25 11:33

    You don't need to set default namespaces with Web API, it will search for controllers in all namespaces in the referenced assemblies (public types with name ending by 'Controller' which implement IHttpController).

提交回复
热议问题