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();
>
I've just had almost exactly the same issue and I solved it like this:
public class UserRole : IdentityUserRole
{
public virtual Role Role { get; set; } // add this to see roles
public virtual User User { get; set; } // add this to see users
}
Now your original code user.Roles.Where(r => r.Role.Name == "Admin").FirstOrDefault();
will work, which could be handy if you don't have easy access to the RoleManager
for any reason.