Skip to main content


Showing posts from June, 2017

Strongly typed Application configuration through EF SQL DB

The idea is to create a strongly typed application configuration by constructing concrete class and get the values populated from the database so that it is easier to change. This would allow admin to directly modify DB values for configuration.
So, let's start with what we need.
Application setting classes as needed
Classes for application setting. It is just a POCO implementation.
/// <summary> /// Entire application settings /// </summary> public class Setting { /// <summary> /// Gets or sets the setting version. /// </summary> /// <value> /// The setting version. /// </value> public int SettingVersion { get; set; } /// <summary> /// Gets or sets the name of the application. /// </summary> /// <value> /// The name of the application. /// </value> public string ApplicationName { get; set; } /// …