Information Technology Reference
In-Depth Information
<add key="tablename" value="test" />
<add key="TableDef_test"
value="AA,key,System.String,DbType.String,0,0,True;BB,sec
ond, System.String, DbType.String ,1,50, false;CC,third,
System.Integer,DbType.Int16,2,0,false" />
<add key="TableDef_test1"
value="id1,key1,System.Integer,DbType.Int16,1,0,true" />
<add
key="TableDef_test2"value=”id2,key21,System.interger,
DbType.Int16,1,0,true; id3,key22,System.Integer,
DbType.Int16,2,0,true;desc2,explain,System.String,
DbType.String ,1,S45,false" />
<addkey="TableDef_test3" value=”id3,key31,System.
Integer,DbType.Int16,1,0,true;desc3,explain,System.String,
DbType.String,1,45,false" />
<add key="TableDef_test4" value="id4,key41,System.
Integer,DbType.Int16,1,0,true;id3,foreignkey1,System.
Integer,DbType.Int16,1,0,false;desc4,explain,System.Strin
g,DbType.String,1,45,false" />
<add key="DBConnectionString" value=”server=localhost;
user id={0};password={1};database=test;pooling=false" />
<add key="DataDllInfo"
value=”,System.Data,Version=2.0.
0.0,Culture= neutral,PublicKeyToken=b77a5c561934e089" />
<add key="ConnTypeStr"value=
"System.Data.SqlClient.SqlConnection" />
4 Implementation
This simple data access framework not only achieved the purpose of regulating
development, but also has the independent controllability and small scale
characteristic. It realized the characteristics of dependence of injected, and used a
variety of design patterns, such as factory model, a single example mode, reflection
mechanism, etc.
The main structure of simple and easy access to database framework design is
shown below:
Fig. 3. static class
 
Search WWH ::




Custom Search