I need help: I ββneed to make a connection to 3 tables, but one of them was not displayed by the Entity Framework, because it is just a relational table, I need something like this:
select *
from Promocao p
join ProdutoPromocao as pp on pp.PromocaoId = p.IdPromocao
join Produto as pr on pp.ProdutoId = pr.IdProduto
join Boteco as b on pr.botecoId = b.IdBoteco
where b.IdBoteco = 1
but the table was ProdutoPromocaonot displayed, how can I do this using the Entity Framework?
I thought of something like:
(from pr in db.Promocao
join p in db.Produto on (pr.Produto.Select(x=>x.IdProduto)) equals p.IdProduto
join b in db.Boteco on p.BotecoId equals b.IdBoteco
where b.IdBoteco == idBoteco
select pr
).ToList();
Someone please help me.
source
share