在一個大型系統(tǒng)中,應(yīng)該允許訪問多個數(shù)據(jù)庫,甚至是多個異構(gòu)的數(shù)據(jù)庫。例如表單模塊使用mysql,數(shù)據(jù)倉庫模塊使用oracle等等。按照這個目標(biāo),數(shù)據(jù)的配置信息:

 

復(fù)制代碼
 1 "Database": {  2 "ConnectionStrings": [  3  {  4 "Name": "MicroStrutLibrary",  5 "ConnectionString": "Data Source=XXXX;Initial Catalog=XXXX;User Id=OperUser;Password=OperUser;MultipleActiveResultSets=true;Persist Security Info=true",  6 "ProviderName": "System.Data.SqlClient"  7  },  8  {  9 "Name": "CMS", 10 "ConnectionString": "Data Source=XXXX;Initial Catalog=XXXX;User Id=OperUser;Password=OperUser;MultipleActiveResultSets=true;Persist Security Info=true", 11 "ProviderName": "System.Data.SqlClient" 12 
        		

網(wǎng)友評論