If I have a controller which has [authorize(role="admin")], how do I create the admin role and add a user to the role? Many people suggested I create a new class and many other changes but it's quite difficult to implement this and I'm wondering if there is a simpler way.
Here's what I have found.
Where should I put this?
Roles.CreateRole("admin");
and where should i implement this
Roles.AddUserToRole(User.Identity.Name,"admin");