示例#1
0
 public void Configuration(IAppBuilder app)
 {
     IdentityConfig.SetupIdentity(app);
     AutofacConfig.ConfigureContainer();
     AreaRegistration.RegisterAllAreas();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes, app);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     ValidationConfiguration();
 }
示例#2
0
        public void Configuration(IAppBuilder app)
        {
            IdentityConfig.SetupIdentity(app);

            var config = new HttpConfiguration();

            config.MapHttpAttributeRoutes();

            SwaggerConfig.Register(config);

            config.DependencyResolver = new AutofacWebApiDependencyResolver(AutofacConfig.ConfigureContainer());

            app.UseWebApi(config);
        }