This question is locked. New answers and comments are not allowed.
How do we join one object on a collection of objects that are stored in another object (using Linq).
e.g.
users object
roles object
roles object has a collection of user objects.
we want to get a list of users that are mapped to a single role.
as standard sql it would be
select users.* from users
inner join users_in_roles on users_in_roles.user_id=users.id
inner join roles on users_in_roles on user_in_roles.roles_id=roles.id
where roles.id=76
e.g.
users object
roles object
roles object has a collection of user objects.
we want to get a list of users that are mapped to a single role.
as standard sql it would be
select users.* from users
inner join users_in_roles on users_in_roles.user_id=users.id
inner join roles on users_in_roles on user_in_roles.roles_id=roles.id
where roles.id=76