public void LoadTables() { var leafLevel = 1; SchemaTables = SchemaUtils.ReadSchemaTables(out leafLevel); LeafLevel = leafLevel; Task.Factory.StartNew(() => { foreach (var table in SchemaTables) { Task.Factory.StartNew(() => { try { LoadColumn(table); SchemaUtils.GetRefColumns(table); foreach (var col in table.Columns) { if (!string.IsNullOrEmpty(col.RefColumns)) { LogUtils.Logs.Log("Table: {0}, refCols :{1}", col.Name, col.RefColumns); } } } catch (Exception e) { LogUtils.Logs.Error(e.Message); } }); } }); }