Our .NET Web API
controller's GET
method has entity framework
join
logic which looks like this:
from myTableAlias in db.myTable
join ruAlias in db.ru
on myTableAlias.someField equals ruAlias.someField
where...
The above join
allows me to set an alias for one table - the db.ru
table. On the line below join
, what if I don't want to reference myTableAlias
, but rather want to define a new alias to a third table and join
with that? Something like:
from myTableAlias in db.myTable
join ruAlias in db.ru, thirdTableAlias in db.thirdTable
on thirdTableAlias.someField equals ruAlias.someField
where...
Obviously thirdTableAlias
can't be defined in this way. I tried adding another from
keyword like from thirdTableAlias in db.thirdTable
, but I was informed that I shouldn't use multiple from
s here.
How can I define both ruAlias
and thirdTableAlias
in this example?