namespace InnovEnergy.API.DataModel; public record Path(Path? Parent, DataElement Element) { public override String ToString() { var path = Element.Name; var parent = Parent; while (parent is not null) { path = parent.Element.Name + "|" + path; parent = parent.Parent; } return $"|{path}"; } }