How to get data from many-to-many relationships in the Entity Framework?

I have two entities related to each other in a many-to-many relationship in my model.

There are only 2 tables that I know that db has 3 tables in SQL, I can try something like this.

select * 
from table1 
where table1.id in (select idTable1 from middleTable)

How to do this using Entity Framework and Linq?

+5
source share
2 answers

I solved the problem with something like this

 container.Table.Where(x=> x.TableRealed.any(y=> x.column == value)).ToList()
+5
source

Entity Design , "" " " " ", , ( ).

, . , : " ", " ". , Person Houses, House People.

, .

+1

All Articles