How do I set the default namespaces in MapHttpRoute?

后端 未结 5 434
没有蜡笔的小新
没有蜡笔的小新 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:38

    Before the MapHttpRoute Factory call add

    System.Web.Mvc.ControllerBuilder.Current.DefaultNamespaces.Add("Namespace.Full.Controllers"); 
    

提交回复
热议问题