Is it possible to change UserManager<T>'s lifetime?

爱⌒轻易说出口 提交于 2020-05-30 08:06:58

问题


I'm trying to change UserManager<T> lifetime from Scoped to Transient inside the ConfigureServices(IServiceCollection service) but I don't know how to do that. Is it possible or I have to inject IServiceProvider inside every object that needs UserManager<T> and then create a new Scope every time I need to use the UserManager?

来源:https://stackoverflow.com/questions/60721511/is-it-possible-to-change-usermanagerts-lifetime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!