I am trying to get an IList<ApplicationRole>
of roles in which a user is currently enrolled.
Now in the Usermanager class I see there is a function call IList<String> usersRoles = userManager.GetRoles(id);
But it just returns the name of the Role as a string. This doesn't help me as I need the id
, name
and the description
of the role.
How can I make a similar call but receive an applicationRole back and not a string?
here is my model:
public class ApplicationRole : IdentityRole
{
[Display(Name = "Description")]
[StringLength(100, MinimumLength = 5)]
public string Description { get; set; }
}