I have a table in the database for various settings in my application. These settings can be added to or changed at any time. I would like to pull them out of the db into an object and reference them in both my server code (C#) and client code (JS).
SettingGroup SettingName type value
Core defaultPagingSize numeric 5
Core pagingType text dynamic
Ecommerce showGallery boolean true
In javascript I can just put them into a JSON object and reference them like this:
var size = settings.core.defaultPagingSize;
Is there a similar way I can do this in C#?
int size = settings.core.defaultPagingSize;