I’m using linq to SQL along with asp.net membership provider. I have three roles set up but want to get only the users of a particular role. This is my query to return all users
public IQueryable<aspnet_User> GetAllMembers()
{
return db.aspnet_Users.OrderByDescending(u => u.UserName);
}
Can anyone point me in the right direction?
Thanks
It looks like you need the same thing that was discussed here. Tvanfosson’s untested answer was the most upvoted:
According to the person who asked the question (John) this didn’t quite work for him so he ended up doing this instead:
Hopefully one of those two will work (please let us know which works for you).