using Microsoft.AspNet.Identity; public ActionResult AddRole(String name){ using (var roleManager = new RoleManager<IdentityRole>(new RoleStore<Identi
using Microsoft.AspNet.Identity;
public ActionResult AddRole(String name)
{
using (var roleManager = new RoleManager<IdentityRole>(
new RoleStore<IdentityRole>(new IdentityDbContext())))
{
if (!roleManager.RoleExists(name))
{
roleManager.Create(new IdentityRole(name));
}
}
}