protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            // Autofac line to add
            AutofacWebapiConfig.Initialize(GlobalConfiguration.Configuration);

            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
Esempio n. 2
0
 public static void Run()
 {
     //Configure AutoFac
     AutofacWebapiConfig.Initialize(GlobalConfiguration.Configuration);
 }
Esempio n. 3
0
 public static void Run(HttpConfiguration config)
 {
     // Configure Autofac
     AutofacWebapiConfig.Initialize(config);
 }