I want to return some values using sqlite database with the following code:
public Dictionary<string, string> GetRegistry()
{
var table = this.connection.Table<Registry>();
Dictionary<string, string> RegistryItems = new Dictionary<string, string>();
foreach (var item in table)
{
}
}
Given that var item
represents an sql table item, so saying item.Age
will be an age and so on. I want to be able to return a dictionary where i can do something like this:
Dictionary registry = this.GetRegistry();
int myAge = registry["Age"];
What should I do within the foreach
clause to make this happen?
Thanks in advance!