private void BindRolesToList() { Models.ApplicationDbContext context = new ApplicationDbContext(); var roleStore = new RoleStore <IdentityRole>(context); var roleMngr = new RoleManager <IdentityRole>(roleStore); UserRoleList.DataSource = roleMngr.Roles.ToList(); UserRoleList.DataBind(); }
private void BindRolesToList() { // Get all of the roles string[] roles = Roles.GetAllRoles(); UserRoleList.DataSource = roles; UserRoleList.DataBind(); RoleList.DataSource = roles; RoleList.DataBind(); }