Best practice for Handling NHibernate parent-child collections

后端 未结 7 973
逝去的感伤
逝去的感伤 2020-12-15 10:35

So in a typical model where you have a parent that can have many children and a child that can have only one parent, how do you manage the adding of children. I have been u

7条回答
  •  北海茫月
    2020-12-15 10:46

    I do it like that except that I don't use property for private list

    private IList _children
    public IEnumerable Children
    {
        get
        {
            return children;
        }
    }
    

提交回复
热议问题