protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); SimpleInjectorContainer.Initializer(); AutoMapperConfig.Configure(); }
public void Configuration(IAppBuilder app) { SimpleInjectorContainer.Initializer(); AutoMapperInitializer.Initialize(); HttpConfiguration config = new HttpConfiguration() { DependencyResolver = new SimpleInjectorWebApiDependencyResolver(SimpleInjectorContainer.ContainerInstance) }; WebApiConfig.Register(config); app.UseWebApi(config); }
public void Configuration(IAppBuilder app) { SimpleInjectorContainer.Initializer(); //AutoMapperInitializer.Initialize(); HttpConfiguration config = new HttpConfiguration() { DependencyResolver = new SimpleInjectorWebApiDependencyResolver (SimpleInjectorContainer.ContainerInstance) }; WebApiConfig.Register(config); OAuthConfig.ConfigureOAuth(app); config.MessageHandlers.Add(new CustomLogHandler()); app.UseWebApi(config); }