Create a new dictionary:
var lookup = new Dictionary<string,>();
add your key and value to the dictionary
lookup.Add(DB Key Value, DB collection);
var mainDictionary = new Dictionary<Type, Dictionary<string, , object>>();
get the right collection:
public Dictionary<string, object> GetCollection<T>(Dictionary<Type, Dictionary<string, object>> mainDictionary)
{
return mainDictionary.Where(x => x.Key == typeof(T)).Select(x => x.Value).SingleOrDefault();
}
NB this is Psuedo code, so no prizes for pointing out it won't compile ;-)