If you use Entity Framework 6 (EF) design first to create the domain classes if you have a relationship many to many without any extra field inside the join table, EF will avoid to create the join table model.
On the ModelA EF will create a list of ModelB, in ModelB will create a list of ModelA without mapping the entity ModelJoin with IdA and IdB
To query all modelA that are related to the ModelB with the id idBToFind this is the query SQL
SELECT ModelA.* FROM ModelA INNER JOIN ModelJoin ON ModelA.IdA = ModelJoin.IdA WHERE ModelJoin.IdB = @idBToFind
This is the same in linq
var idBToFind = 10; var q1 = from a in db.ModelA where a.ModelBs.Any(b => b.IdB == idBToFind) select a;