Skip to content

Instantly share code, notes, and snippets.

@yesez
Created May 6, 2013 03:52
Show Gist options
  • Save yesez/5523266 to your computer and use it in GitHub Desktop.
Save yesez/5523266 to your computer and use it in GitHub Desktop.
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
//DI
IKernel kernel = new StandardKernel();
kernel.Bind<IPaisRepository>().To<PaisRepository>();
System.Web.Http.Dependencies.IDependencyResolver resolver = new NinjectResolver(kernel);
GlobalConfiguration.Configuration.DependencyResolver = resolver;
WebApiConfig.Register(GlobalConfiguration.Configuration);
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment