using System.Collections.Generic;
public int IDMacroTab { get; set; }
public List<Tab> Tabs { get; set; }
Slots = new List<Slot>();
public int IDTab { get; set; }
public List<Slot> Slots { get; set; }
public int IDSlot { get; set; }
public static void Main()
List<MacroTab> hierarchaldata = CreateHierarchaldata();
var flattenedList = (from macroTab in hierarchaldata
from tab in macroTab.Tabs
select new {macroTab.IDMacroTab, tab.IDTab, slot.IDSlot}).ToList();
List<MacroTab> CreateHierarchaldata()
List<MacroTab> p = new List<MacroTab>()