Skip to content

Instantly share code, notes, and snippets.

@thecopy
Created September 4, 2012 20:29
Show Gist options
  • Save thecopy/3626106 to your computer and use it in GitHub Desktop.
Save thecopy/3626106 to your computer and use it in GitHub Desktop.
public static class Bootstrapper
{
internal static IKernel Kernel = null;
internal static NinjectDependencyResolver NinjectDependencyResolver = null;
public static void StrapTheBoot()
{
var kernel = new StandardKernel();
kernel.Bind(typeof(IGenericRepository<>))
.To(typeof(GenericRepository<>))
.InRequestScope();
kernel.Bind<IControllUserRepository>()
.To<ControllUserRepository>()
.InRequestScope();
kernel.Bind<IMessageQueueService>()
.To<MessageQueueService>()
.InSingletonScope();
kernel.Bind<IPluginService>()
.To<PluginService>()
.InSingletonScope();
Kernel = kernel;
NinjectDependencyResolver = new NinjectDependencyResolver(kernel);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment