I want to change the role of a user in my application.
I used Dependency Injection to access UserManager _usermanager in my controller. To change the role I'm supposed to call _usermanager.AddToRoleAsync(IdentityUser user, string role), but I can't seem to locate the a IdentityUser enity.
[HttpPost]
public async Task<IActionResult> BewerkGebruiker(int id , ... )
{
Gebruiker g;
using (var context = new UTILcontext())
{
_userManager.AddToRoleAsync(<<what do i put here?>>),Rol);
_manager.UpdateGebruiker(g);
return RedirectToAction("Gebruikers");
};