mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-23 01:32:16 +00:00
fix role deleting
This commit is contained in:
parent
4d4a59bc15
commit
ec06cd1752
1 changed files with 3 additions and 3 deletions
|
@ -631,10 +631,10 @@ public ActionResult DeleteRole(string id)
|
|||
[ValidateAntiForgeryToken]
|
||||
public ActionResult DeleteRoleConfirmed(string id)
|
||||
{
|
||||
Role role = db.IdentityRoles.Find(id);
|
||||
db.IdentityRoles.Remove(role);
|
||||
var role = db.Roles.FirstOrDefault(x=>x.Id==id);
|
||||
db.Roles.Remove(role);
|
||||
db.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
return RedirectToAction("Roles");
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
|
|
Loading…
Reference in a new issue