Can someone show me how to get a user’s usergroup relation in LINQ to Entities from this model?
I need get a list to be able to loop it after ward in such way:
foreach (QASModel.UserGroup usergroup in ...)
Bonus points if you can provide some examples on how to :
- get a user’s role permission “path” based on the user ID
- get a user’s role based on it’s ID
- get a all user(s) of a specific role based on the role ID
that would also help.
I think that this is what you’re looking for:
Please note that I didn’t run this through a complier, but this should give you the basic idea of what you’re looking for.