Database schema in configuration files
I often find myself changing my database schema, and consequently, the stored procedures and code in my asp.net app.
So I am thinking: can I include some sort of database schema in my configuration files, such as:
<?xml version="1.0"?>
<ModuleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ConnectionString>server=localhost;database=ThePhi le;Trusted_Connection=True;</ConnectionString>
<database>
<table1>
<columns>
<column name="column1" DBType="NVarChar" size="20"/>
.....
</columns>
</table1>
</database>
</ModuleSettings>
My question is: if I go for the above approach, what is the best way to access the above information. For example, can I change ModuleSettings.cs to read this information.
Hope to hear from u. thanks
|