I am trying to create some users in a seed method, but no luck.
I used this example: How to add a role and Users in asp.net mvc 5? , but UserManager seams will be created differently.
In the AccountController this instance is loaded into the constructor:
public AccountController( UserManager<ApplicationUser> userManager, SignInManager<ApplicationUser> signInManager, IEmailSender emailSender, ISmsSender smsSender, BennerCliContext applicationDbContext) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _smsSender = smsSender; _applicationDbContext = applicationDbContext; }
But my seed method lies in the MyDbContext class.
How can I access an instance of UserManager from there?
Are there other ways to create users in vnext?
Update
After the proposal of Vladislav Karamfilov:

source share