C
C#3y ago
Nathan S.

EF Structuring Problem

Basically I have users that I want to assign to a group. But I also want the group to have a parent, that in of itself may have a parent, etc. Should I just make a model that has a Parent attribute and a Children attribute with a list of Group? If so, how? I had issues with building this previously.
1 Reply
Sossenbinder
Sossenbinder3y ago
I'm not sure, but I think this would then create a mapping table in sql, so that should work Basically the relationships would be in an independent mapping table Or wait, is it a 1:n or n:m relationship? If it's the first you can also just link from the many side (child) to the one side (parent)

Did you find this page helpful?