autofac获取全局Container

_UserService = ((IContainerProviderAccessor)HttpContext.Current.ApplicationInstance).ContainerProvider.ApplicationContainer.Resolve<IUserContract>();

你可能感兴趣的:(autofac获取全局Container)