Project DescriptionThis stores settings in an OleDb/Sql database using an API similar to ApplicationSettingsBase. Settings vary by app, version, user.
Dual licensed, MIT and MS-PL
What are Settings?Settings are variables that change an applications behavior that will likely need to
- vary over time (e.g. an administrator needs to update a setting months after deployment),
- over versions (e.g. an application is upgrading from version one to two and the installer will need to covert the old settings to the new, in as far as it is logically possible),
- over different users (e.g. if the application has users, they may need settings to be different just for them),
- over different applications (e.g. in a server application that hosts several applications that all share a common settings infrastructure)
The
ApplicationSettingsBase API in the .NET framework is a well known, but cumbersome API to work with. ApplicationSettingsBase is tightly bound to the concerns of a desktop application who stores it's data in a file on the hard drive. These concerns made it hard for me to implement an ApplicationSettingsBase that stored settings in a database on behalf of a website. As a result, the API is inspired by ApplicationSettingsBase, but doesn't really use it at the moment.
Ref:
Using Settings in C#Ref:
Application Settings for Windows FormsMotivationMany organizations treat the web.config and any xml file on the file system as code and it is subject to a burdensome waterfall process to change it. Database stored settings, on the other hand, usually are treated as data.
This API aims to allow for setting storage and retrieval
Sample UsageYou declare a settings class, add items to it and save it. The persistence layer determines if an save or upgrade needs to be done. Reading just requires knowing the string representation of the name. It's on the TODO list to implement a dynamic invocation of settings properties.
History This library was a byproduct of developing
Hicmah, a ASP.NET hit counter. Previously named DbSettings
Similar ProjectsIrishSettings may not meet your needs, here are some other open source offerings
Setting4Net XML file backed settings
Settings.NET- Fluent API
Settings Manager - not yet reviewed
Enviornments Settings Schemas defined in Excel, uses BizTalk, writes xml
Settings Gen - Uses T4, also stores to file or database