public void AddChild(PlanNodeDO child, int?ordering) { child.Ordering = ordering ?? (ChildNodes.Count > 0 ? ChildNodes.Max(x => x.Ordering) + 1 : 1); ChildNodes.Add(child); }
public void AddChildWithDefaultOrdering(PlanNodeDO child) { child.Ordering = ChildNodes.Count > 0 ? ChildNodes.Max(x => x.Ordering) + 1 : 1; ChildNodes.Add(child); }