开发者

EF 4 relationship in the same entity

开发者 https://www.devze.com 2023-01-27 17:57 出处:网络
I Have a Model like this, My Menu entity have a relation 0..1 to 0..1 with the same entity (in themself) .. for have RootMenu recur开发者_StackOverflowsively .. but I dont know how is the best way to

I Have a Model like this,

My Menu entity have a relation 0..1 to 0..1 with the same entity (in themself) .. for have RootMenu recur开发者_StackOverflowsively .. but I dont know how is the best way to saveChange with EF he always gave me errors..

EF 4 relationship in the same entity

Thank you!


Change that to 0..1 to 1, or 1 to 0..1 (depending on that direction the association goes). The PK is not nullable, so one side of the association has to be :1

0

精彩评论

暂无评论...
验证码 换一张
取 消