我在尝试用户可以评论出版物。我创建了表评论与EF核心。同一张表的外键
有意见多层次,我implmeneted方式如下:
表出版物
- Id (primary key)
表评论
- PublicationId (foreing key to Publication)
- Comment
- ParentComment (foreign key to Comments, that is, the same table)
的问题是一个错误警告我,我无法将同一张桌子上的前调钥匙弄碎。那么我怎样才能实现层次结构呢?
你可以分享你的实体模型? – mersey
你是先使用代码吗? –