Kris Saelen

Kris Saelen

  • NA
  • 5
  • 1.6k

Self joining Linq query

Mar 2 2018 6:53 AM

Hello,

I'm a bit stuck on building a Linq query.

I have 2 tables "groups" and "products"

Groups table exists of

Id
ParentId
Name

Products table exists of

Id
GroupId
Name

Well the most difficult part is to build a Linq query to get all groups, child groups and child of child groups.

I also have to check if the article table contains the group id.

It's because i'm building my menu structure to show only groups and children groups which contains products.

Any idea if this is possible or some advice to get started? It's a difficult one.


Answers (1)