Exemple #1
0
        public static void Run()
        {
            // Configure Autofac
            AutofacWebapiConfig.Initialize(GlobalConfiguration.Configuration);

            //Configure AutoMapper
            AutoMapperConfiguration.Configure();
        }
Exemple #2
0
        private void Application_Start(object sender, EventArgs e)
        {
            var config = GlobalConfiguration.Configuration;

            // Code that runs on application startup
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            AutofacWebapiConfig.Initialize(config);
            BundleConfig.RegisterBundle(BundleTable.Bundles);
            Bootstrapper.Run();
            GlobalConfiguration.Configuration.EnsureInitialized();
        }