Defining and Accessing Configuration

Defining Configuration

When defining configuration settings, use appSettings within the app.config or web.config. Make sure each app setting is properly commented.

Accessing Configuration

When accessing configuration stored within a configuration file, do not use the static methods exposed on ConfigurationManager, as this type limits your ability to mock configuration settings for unit testing.

The CampusNexus framework includes ConfigurationMangerWrapper that wraps ConfiguraitonMangaer. ConfigurationMangerWrapper is registered with the container through the IConfigurationManager interface.


Leave a Reply

Skip to toolbar