Created
May 6, 2013 03:42
-
-
Save yesez/5523238 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private static IKernel CreateKernel() | |
{ | |
var kernel = new StandardKernel(); | |
kernel.Bind<Func<IKernel>>().ToMethod(ctx => () => new Bootstrapper().Kernel); | |
kernel.Bind<IHttpModule>().To<HttpApplicationInitializationHttpModule>(); | |
RegisterServices(kernel); | |
//Integrar Ninject como Dependency Resolver en la Config. a nivel Global. | |
GlobalConfiguration.Configuration.DependencyResolver = new NinjectDependencyResolver(kernel); | |
return kernel; | |
} | |
private static void RegisterServices(IKernel kernel) | |
{ | |
kernel.Bind<IPaisRepository>().To<PaisRepository>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment