I'm new to Identity , I'm having trouble implementing the Delete users already registered method. I've done Action, I've managed View, but I'm not aware of what methods Identity use to do such an operation. I researched Google, but I must be putting it wrong, because I have not found anything so far.
[HttpPost]
public ActionResult Delete(Guid id, IdentityUser user)
{
try
{
_userManager.RemoveFromRoles(id = UserId);
return RedirectToAction("Index");
}
catch
{
return View();
}
}
I've only done Action so far:
public ActionResult Delete(Guid ID)
{
return View(UserManager.FindById(ID));
}
[HttpPost]
public ActionResult Delete(Guid id, IdentityUser user)
{
try
{
_userManager.RemoveFromRoles(id = UserId);
return RedirectToAction("Index");
}
catch
{
return View();
}
}