private static void InitializeSimpleInjector() { var container = new Container(); container.Options.DefaultScopedLifestyle = new WebRequestLifestyle(); ServiceResolver.Configure(container, Lifestyle.Scoped); container.RegisterMvcControllers(); container.RegisterMvcIntegratedFilterProvider(); container.Verify(); DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container)); }