public void ConfigureServices(IServiceCollection services) { services.AddSingleton(Configuration); IoCConfig.Initialize(services); services.AddCors(); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); IoCConfig.Initialize(GlobalConfiguration.Configuration); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); IoCConfig.Initialize(); DependencyResolver.SetResolver(new AutofacDependencyResolver(IoC.Instance)); }