I have the following class named Node
class Node { public int Id { get; set; } public int? ParentId { get; set; } public string
Replace Children.ToString(); with:
Children.ToString();
string.Join(",", Children.Select(x => x.Id));
You are calling ToString on a IList<Node> so it's giving you the type name.If you want to see Ids of the child nodes you can use string.Join as shown above.
ToString
IList<Node>
string.Join