fix role deleting

This commit is contained in:
Michael 2017-03-26 12:05:11 -04:00
parent 4d4a59bc15
commit ec06cd1752

View file

@ -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)