Before the update of the dll's in the Entity Framework i was able to do this
user.Roles.Where(r => r.Role.Name == "Admin").FisrtOrDefault();
Now, i can only do r.RoleId, and i can't find a way to retreive the name of thar Role Id. I'm using this in my controllers and in my AuthorizeAttribute class.
Can someone help me here?
Regards
Try this
string id = UserManager.FindByEmail(model.Email).Id;
IList<string> roleNames=UserManager.GetRoles(id);