private static StandardKernel CreateKernel() { var kernel = new StandardKernel(); NinjectWebCommon.RegisterServices(kernel); return(kernel); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); var kernel = new StandardKernel(); NinjectWebCommon.RegisterServices(kernel); //use class BasketModelBinder for create instanses Basket ModelBinders.Binders.Add(typeof(Basket), new BasketModelBinder()); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); NinjectWebCommon.RegisterServices(new StandardKernel()); }