Created
February 17, 2014 21:39
-
-
Save kstenson/9059761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MvcApplication : NinjectHttpApplication | |
{ | |
protected void RegisterRoutes(RouteCollection routes) | |
{ | |
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | |
routes.MapRoute( | |
"Default", // Route name | |
"{controller}/{action}/{id}", // URL with parameters | |
new | |
{ | |
controller = "Home", | |
action = "Index", | |
id = "" | |
} // Parameter defaults | |
); | |
} | |
protected override void OnApplicationStarted() | |
{ | |
RegisterAllControllersIn(Assembly.GetExecutingAssembly()); | |
RegisterRoutes(RouteTable.Routes); | |
} | |
protected override IKernel CreateKernel() | |
{ | |
var kernel = new StandardKernel(); | |
kernel.Load(Assembly.GetExecutingAssembly()); | |
return kernel; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment