EF code-first self referencing relationships

May 29, 2012 at 5:28 PM

Hello,

  I have changed AppendChildren a bit to make it work with EF code-first self referencing relationships : (I removed tolist and count methods)

     private void AppendChildren(TagBuilder parentTag, T parentItem, Func<T, IEnumerable<T>> childrenProperty)
        {
            var children = childrenProperty(parentItem);
            if (children == null || !children.Any())
            {
                return;
            }