I have following LINQ statement. How do I change this so I get GroupIDs only in the subquery. My syntax here is not working.
And also only distinct Users.
from u in Users
join ug in UserGroups on u.UserID equals ug.UserID
where ug.GroupID == (from igr in UserGroups where igr.UserID == 1 select igr.GroupID)
select u