Пример #1
0
        private static StandardKernel CreateKernel()
        {
            var kernel = new StandardKernel();

            NinjectWebCommon.RegisterServices(kernel);
            return(kernel);
        }
Пример #2
0
        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());
        }
Пример #3
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     NinjectWebCommon.RegisterServices(new StandardKernel());
 }