public ItemInfo(object dataItem, object destItem) { this.Item = dataItem; this.destItem = destItem; this.Fields = DiffUtility.GetFields(destItem); var dataChildItems = new List <object>(); var destChildItems = new List <object>(); foreach (var item in DiffUtility.GetChilds(dataItem)) { dataChildItems.Add(item); } foreach (var item in DiffUtility.GetChilds(destItem)) { destChildItems.Add(item); } var query = from dataChild in dataChildItems join destChild in destChildItems on $"{DiffUtility.GetListName(dataChild)}{DiffUtility.GetItemKey(dataChild)}" equals $"{DiffUtility.GetListName(destChild)}{DiffUtility.GetItemKey(destChild)}" select new { DataItem = dataChild, DestItem = destChild }; foreach (var item in query) { this.childList.Add(new ItemInfo(item.DataItem, item.DestItem)); } }