I have two tables Service
and Provider
. Between them is a joining table ServiceProvider
which has only 2 fields - one for each of the two PKs. When added to the edmx the joining many-to-many table is abstracted away and can't be seen (as expected).
This is all fine except when I want to get Providers based on a given service. From this question:
it looks like the answer would be simply:
var query = from p in entities.Providers
from s in entities.Services
where s.Id == 15
select p;
but this returns ALL providers. What am I doing wrong here?