views:

48

answers:

1

I am working on a pretty typical asp.net web site and using sql server 2005 as database. I have created a Model dll holding the applications typical business logic.

The application is dependent of some static data which is stored in the db in lack of a better persistent storage, but since the application is dependent of this data in order to function correctly I feel these are Properties of the model and should always be accessible to the application, and I should be able to run unit/integration tests to make sure this data is available, which is a bit contrary to the principle of unit testing against the database.

So does anybody have a good approach of handling your models persistent static data? I have been thinking about using embedded xml files as well but there are obvious downsides to this as well.

+1  A: 

If these properties are few, unrelated to each other, and can be expressed as simple Key-Value pairs, I would put them in the configuration file (web.config) as appSettings.

Nuno G