public static bool AreEqual(Child child, DtoChild dtoChild) { return(dtoChild.Id == child.Id && dtoChild.Name == child.Name); }
public static int GetDepth(DtoChild child) { var result = child.Parent != null?GetDepth(child.Parent) + 1 : 0; return(result); }