select aspnet_Users.UserName from aspnet_Users,aspnet_UsersInRoles, aspnet_Roles
where aspnet_UsersInRoles.RoleId=aspnet_Roles.RoleId
and
aspnet_UsersInRoles.UserId=aspnet_Users.UserId
and
aspnet_Roles.RoleName='abc'
答案 0 :(得分:1)
from user in DbContext.Users
where user.UsersInRoles.Any(uir=>uir.Role.RoleName=="abc")
select user.UserName