I am retrieving tables and their respective fields from a database, and would like to store them within my C# application.
The two storage options which I can think of are:
-
A
Dictionarywhich uses the table’s name as a key and aList<string>to store the fields. Thus, something like this:Dictionary<string, List<string>> -
A list within a list:
List<List<string>>
What would be the better approach in terms of performance and best practice? Are there better options?
Thanks
I prefer (1), perhaps making things a bit more object oriented however: