Hello Friends!! Currently I am working with ASP.NET authentication - identity 2 for creating role and membership management. It is a basic problem what I faced given below specifically for creating roles:
Click Event: CreateRole.cs
protected void Button1_Click(object sender, EventArgs e)
{
var RoleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(new ApplicationDbContext())); //Database connection - LocalDB
IdentityRole role = new IdentityRole();
role.Name = TextBox1.Text; //User input for role creation
RoleManager.Create(role); //Create role
&nbs ...
Go to the complete details ...