public ActionResult Addrole(AspNetRoles model)
       {
           ApplicationDbContext context = new ApplicationDbContext();

           RoleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(context));
           var roleresult = RoleManager.Create(new IdentityRole(model.Name));
           return RedirectToAction("RoleIndex");    
       }
 public ActionResult Addrole()
 {
     var ObjRole = new AspNetRoles();
     return View(ObjRole);
 }
 public ActionResult DeleteRole(AspNetRoles model, string RoleName)
 {
     var ObjRole = db.AspNetRoles.Where(c => c.Name.Equals(RoleName, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
    
     db.AspNetRoles.Remove(ObjRole);
     db.SaveChanges();
     return RedirectToAction("RoleIndex");
 }