I have a site that uses Ninject for dependency injection and I have Routing defined within a Bootstrapper class like so:
public void RegisterRoutes()
{
Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
Routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
Routes.MapRoute(
null,
"{pageTitle}",
new { controller = "Home", action = "Page", pageTitle = "Index" }
);
Routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
I have added an Area to the project but the default AdminAreaRegistration is not registering the root
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Admin_default",
"Admin/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
Where or how do I register the Area with Ninject?