There is an audit table with which users interacted with the system, I need to build a LINQ query that does the following SQL. The goal of this is to pull back all the rows EXCEPT those made by users with the "TargetRole":
SELECT distinct a.*
FROM AuditTable AS a
JOIN MyUsers u ON a.PaPersonId = u.PaPersonId
LEFT JOIN AspNetUserRoles ur ON u.Id = ur.UserId
LEFT JOIN AspNetRoles r ON ur.RoleId = r.Id AND r.Name = 'TargetRole'
WHERE r.Id IS NULL
In the actual query there is more going on in the where clause, but I cannot figure out how to form the LINQ statement (query notation) to exclude the target role.