i have many ids of persons that i want see group is Assigned to this person، i have sql query like this
SELECT *
FROM cor.[Group] AS g
LEFT JOIN cor.PersonGroup AS pg ON
g.Id=pg.GroupId AND
pg.PersonId IN (1,2)
and i want to give linq query for this i write this linq query
from g in _context.Groups join
pg in _context.PersonGroups.Where(pp =>personIds.Contains( pp.PersonId))
on g.Id equals pg.GroupId
But this is different from what I want