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
Ask the RoleMananger?
RoleManager.Roles.
// or
RoleManager.FindByIdAsync()
// or
RoleManager.FindByNameAsync()
You may want to take some time and learn the new security features in Asp.Net Security and Asp.Net Identity.