public static void Initialize() { MvcBootstrapper mvcBootstrapper = new MvcBootstrapper(new ConventionalRegistrarConfig()); //依赖注入初始化 mvcBootstrapper.Initialize(); mvcBootstrapper.IocManager.Register <ISignInManager, IdentitySignInManager>(DependencyLifeStyle.Transient); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); MvcBootstrapper.Init(); }
public static void Start() { AutofacBootstrapper.Configure(); MvcBootstrapper.Configure(); AutoMapperBootstrapper.Configure(); }