Creating a UserManager outside of built in dependency injection system

后端 未结 3 1257
太阳男子
太阳男子 2021-01-04 11:24

This is using asp.net core with identity and entity framework core. I working on a saas application where I have a separate admin web app where you can add new tenants to t

3条回答
  •  醉话见心
    2021-01-04 11:37

    The solution of the problem in this way

    static IUserStore _store = new UserStore(new context()); 
    static UserManager _userManager = new UserManager(_store, null, new PasswordHasher(), null, null, null, null, null, null);
    

提交回复
热议问题