I am trying to store signalR groups in Dictionary>
But i do not know how to lookup a string value in HashSet and return key string?
var dict = new Dictionary<string, HashSet<string>>();
dict["GroupA"] = ["user1","user2","user3"];
dict["GroupB"] = ["user3", "user4"];
dict["GroupC"] = ["user4","user5","user6"];
I want to lookup for "user3" and it should returns ["GroupA","GroupB"]. I do not know about that how to use dictionaries in c#. I have around ~20k groups and many of users in it. Does it handle too much groups and users with singleton pattern (store in memory)?
Hope someone help me with an working example. I am beginner here. Thanks!