protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); MapperConfig.ConfigureMapping(); //TODO: удалить после завершения разработки Database.SetInitializer(new InitializerDb()); // внедрение зависимостей NinjectModule module = new DIModule(); var kernel = new StandardKernel(module); DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel)); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //внедрение зависимостей NinjectModule viewModule = new NinjectRegistrations(); NinjectModule serviceModule = new StockApp.BLL.Util.NinjectRegistrations(); var kernel = new StandardKernel(viewModule, serviceModule); DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel)); //сопостовление экземпляров моделей - AutoMapper MapperConfig.ConfigureMapping(); }