• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

Configuration Pattern - .NET Application - Config database

Hi

I have a setup table in my database which i used for configuration of an old VB6 application.
In that application i just created a lot variables for each different configuration.

However i was wondering if there is any pattern i could follow to make my new Configuration class more clever, easier to maintain and so on.
0
mSchmidt
Asked:
mSchmidt
1 Solution
 
HarryNSCommented:
Create a class with static variables. On application start, read it from your DB and load this static variables and you can use this any where in your application.
0
 
Anurag ThakurTechnical ManagerCommented:
i will take the approach suggested by Harry above as it will keep the things simple and easy to maintain
It totally depends on the requirements of the project at hand in which way we need to build the configuration reading mechanism in the application
in some applications if the configuration is not changing rapidly and dynamically then reading at the beginning of the application is best else the confuguration can be brought back from the database on the need to know basis but it will just include more database load and more round trips and a little more of processing and coding effort and will increase the maintenance of the project
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now