Building and using a custom dictionary

Trying to find out the best way to tackle this issue:

Assuming I need one or internal dictionary (like the c# key-value dictionaries), for example a dictionary that stores a list of people names and their ids.

I will need an API for adding / removing / editing and searching an item by ID and of course I will need these items to be stored in the db so they could be used in all pages.

for example I will create a service that reads an external list of people and their IDs and populate this “dictionary”
something like Dictionary.AddValue(100, "John Doe") accordingly.

On my views Razor pages I could use something like @Dictionary.GetValue(100) which will generate “John Doe” html string.

At first I was thinking of using Umbraco Dictionary but it seems that its API is very limited.

Anyone got any direction ?

Thanks!


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/85547-building-and-using-a-custom-dictionary