Skip to content

Instantly share code, notes, and snippets.

@fecub
Created April 30, 2013 09:16
Show Gist options
  • Save fecub/5487575 to your computer and use it in GitHub Desktop.
Save fecub/5487575 to your computer and use it in GitHub Desktop.
output complete database design
public static void outputdesign(Dictionary<string, Dictionary<string, Dictionary<string, object>>> TableDesign)
{
foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, object>>> item in TableDesign)
{
Console.WriteLine(item.Key);
foreach (KeyValuePair<string, Dictionary<string, object>> item2 in item.Value)
{
foreach (KeyValuePair<string, object> item3 in item2.Value)
{
string output = "\t" + item2.Key + " " + item3.Key;
if (item3.Key.Contains("fKeys"))
{
Dictionary<string, string> item4 = item3.Value as Dictionary<string, string>;
output += " " + item4["srcTbl"] + ":" + item4["srcClmn"] + " --> " + item4["destTbl"] + ":" + item4["destClmn"];
}
else
{
output += " " + item3.Value;
}
Console.WriteLine(output);
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment