I have a query for all users that looks like this:
u in db.AspNetUsers
I think this does what you are asking:
from u in db.AspNetUsers where u.AspNetRoles.Any(r => r.Name == "SuperAdmin") orderby u.UserName select . . .
Any method will return true if any of the items in the collection meet the criterion lambda (
r => r.Name == "SuperAdmin", in this case). If any items in the collection
AspNetRoles of user object
u has a
Name where the value is
"SuperAdmin", then the result of
Any is true. If none of the items meet the criterion, the
Any returns false.