I have two tables/entities Users and Companies.
Both are linked m-n relationship.
When I use those tables in my EDMX and generate the POCOs, the m-n mapping table disappears (seemingly becasue there is nothing in there except hte two PKs).
Instead, navigation properties get created by the EDMX, which is fine:
user.Companies ... -> gives me all users for that company
and
company.Users ... -> gives me all companies for that user
But what if I wanted all users that do NOT have a company associated with them?
How would I access the missing table to create the proper join?
You should find users without company (as you said), so their use.Companies.Count should be zero, just convert this to linq (like what is below):
Edit: About your second problem: But what if I wanted all copmanies that are not associated with the given user?
In this case you should find companies which doesn’t have specific user:
Checking company has specific user or not:
Fetching companies without specific user: