我在WebAPIConfig中具有以下内容, var container = new UnityContainer(); RegisterTypes(容器);
config.DependencyResolver = new UnityResolver(container);
GlobalConfiguration.Configuration.DependencyResolver = new UnityResolver(container);
我需要访问DependencyResolver.current.GetService(),但它返回null。您能否建议在WebAPIConfig级别上进行哪些更改才能在其他位置访问DependencyResolver.current?