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
The solution of the problem in this way
static IUserStore<ApplicationUser> _store = new UserStore<ApplicationUser>(new context());
static UserManager<ApplicationUser> _userManager = new UserManager<ApplicationUser>(_store, null, new PasswordHasher<ApplicationUser>(), null, null, null, null, null, null);
After looking through the identity source you can pass nulls in to get the correct results. Should have just tried this first.
I would think you should have at least the UserStore:
UserStore<ApplicationUser> _userStore = new UserStore<ApplicationUser>(context, null);
Mock<ILogger<UserManager<ApplicationUser>>> mockLogger = null;
mockLogger = new Mock<ILogger<UserManager<ApplicationUser>>>();
I mocked the logger.