
Untitled
By: a guest on
Jul 18th, 2012 | syntax:
None | size: 0.77 KB | hits: 5 | expires: Never
Controller in separate assembly and routing
public class ShinnyController : Controller
{
[HttpGet]
public string Index()
{
return "Hello, from Awesome.Mvc.Lib";
}
}
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new [] { "Slick.App.Controllers" }
);
new [] {"Namespace1", "Namespace2"}
var myRoute = routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new [] { "Slick.App.Controllers" }
);
myRoute.DataTokens["UseNamespaceFallback"] = false;