score:1

Accepted answer

Basically you have two options.

  1. Read both tables into memory and process the result in code. Suitable for small collections.
  2. Create a view with a recursive CTE and map that view in EF. Join with that view. More complicated to write, but gives the best performance, especially for large collections.

Related Articles