Help with Entity framework

Asked

Viewed 18 times

1

Hello everyone I have sequinte select, which joins 3 tables. This select works in the bank. I would like to make this same select using Entity with Asp.net mvc. But I have no idea how to do it. Any suggestions? I want to return the name of the city of origin and destination. In the table sis_freight

select FC.*, 
SUO.Sigla as 'UF_Origem' , SD.Nome as 'Cidade_Origem', SUD.Sigla as 'UF_Destino', SC.Nome as 'Cidade_Destino'  
from SIS_Frete_Condicao FC 
inner join SORTER_Cidade SC
on FC.ID_Cidade_Origem = SC.ID
Inner join SORTER_UF SUO
ON FC.ID_UF_Origem = SUO.ID
left join SORTER_Cidade SD
on FC.ID_Cidade_Destino = SD.ID
left join SORTER_UF SUD
on FC.ID_UF_Destino = SUD.ID
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.