0

I have the following query

var table = Context.table
    .Include(x => x.extraTable);

I now want to perform a join on otherTable to other table.

If I was using SQL I would do it like this:

SELECT *
FROM table t
INNER JOIN otherTable o
ON t.id = o.mainId

How can I do this with my query above.

I have tried things along the lines of

var table = Context.table
join Context.otherTable on (x => x.id = otherTable.id)

but no luck.

Either there is not much on Google about this, or I cannot find the correct terms to search for.

EDIT: This is not a duplicate of the stated duplicate as I am using context, whilst the question mentioned is not

I have updated the question to show that I am using an include statement in my query.

Alex
  • 3,730
  • 9
  • 43
  • 94

0 Answers0