Entity Framework 4: Self-regulatory Objects, Parent / Child

we use the first model design.

When I create an independent link of the parent affiliated association to entities, the designer always marks one end of "a lot", which would be "children", and everything is in order. But the designer makes the other end "1 (One)", which is not entirely normal, since the parent is not required. If I changed it to "0..1 (zero or one)", the designer will change the other end from "* Many" to "0..1 (zero or one)". Thus, both ends: "0..1 (zero or one)". It drives me crazy: (

What am I doing wrong?

+4
source share
1 answer

Is the "ParentKey" column labeled NULL (in both DB and EDMX)? Perhaps after you set up the relationship type, you can block it.

+1
source

Source: https://habr.com/ru/post/1345745/


All Articles