static void Main(string[] args) { DBEngine <int, DBElement <int, string> > db = new DBEngine <int, DBElement <int, string> >(); ItemFactory <int, string> itemFactory = new ItemFactory <int, string>(); "Demonstrating Requirement #2".title(); DBElement <int, string> elem = itemFactory.Create(); elem.name = "element"; elem.descr = "test element"; elem.timeStamp = DateTime.Now.AddDays(-4); elem.children.AddRange(new List <int> { 1, 2, 3 }); elem.payload = "elem's payload"; WriteLine("\n Item to be inserted.. \n"); elem.showElement(); db.insert(1, elem); db.showDB(); WriteLine(); WriteLine("\n Inserting second element into DB :"); DBElement <int, string> elem2 = new DBElement <int, string>(); elem2.name = "element2"; elem2.descr = "test element2"; elem2.timeStamp = DateTime.Now; elem2.children.AddRange(new List <int> { 1, 2, 3, 4 }); elem2.payload = "elem2's payload"; WriteLine("\nItem to be inserted.. \n"); elem2.showElement(); db.insert(2, elem2); WriteLine("\n\n DB after insertion:"); db.showDB(); "Adding relationship :".title('.'); WriteLine("\n Elements in DB :"); db.showDB(); int key = 2; var children = new List <int> { 5, 6 }; WriteLine("\n Add children for key {0} : ", key); foreach (var child in children) { Write("{0}, ", child); } WriteLine(); db.addRelationship(key, children); WriteLine("\n\n DB after the change :"); db.showDB(); WriteLine(); "".demarcation(); ItemEditorTest editorTest = new ItemEditorTest(); editorTest.test(); }