Exemplo n.º 1
0
        protected void Application_Start()
        {
            GlobalConfiguration.Configuration.DependencyResolver =
                new AutofacWebApiDependencyResolver(
                    IoCConfig.Build(Assembly.GetExecutingAssembly()));

            GlobalConfiguration.Configure(WebApiConfig.Register);
        }
Exemplo n.º 2
0
 void Application_Start(object sender, EventArgs e)
 {
     IoCConfig.Build();
     // Code that runs on application startup
     AreaRegistration.RegisterAllAreas();
     GlobalConfiguration.Configure(WebApiConfig.Register);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
 }
Exemplo n.º 3
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            DependencyResolver.SetResolver(
                new AutofacDependencyResolver(
                    IoCConfig.Build(typeof(MvcApplication).Assembly, new ViewRegistrationSource())));
        }