Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task<ActionResult> Delete(string id)
- {
- ApplicationUser user = await userManager.FindByIdAsync(id);
- if (user != null)
- {
- IdentityResult result = await userManager.DeleteAsync(user);
- if (result.Succeeded)
- {
- return RedirectToAction("Index");
- }
- else
- {
- TempData["Error"] = "Error!";
- return RedirectToAction("Index");
- }
- }
- TempData["Error"] = "Error!";
- return RedirectToAction("Index");
- }
Add Comment
Please, Sign In to add comment