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);
        }
예제 #2
0
 public static void Run()
 {
     //Configure AutoFac
     AutofacWebapiConfig.Initialize(GlobalConfiguration.Configuration);
 }
예제 #3
0
 public static void Run(HttpConfiguration config)
 {
     // Configure Autofac
     AutofacWebapiConfig.Initialize(config);
 }