# web.config配置项目

<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />
<!--<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />-->
</configSections>
<connectionStrings>
<!--SQLServer数据库的连接字符串-->
<add name="sqlserver" providerName="System.Data.SqlClient" connectionString="Server=192.168.**.***;Database=WinFramework;User Id=sa;Password=*******;" />
<!--SQLite数据库的连接字符串 本地路径:|DataDirectory| 统一路径:d:\Code\GitHub\MES\MES.Framework\Doc\MESFramework.db-->
<add name="sqlite" providerName="System.Data.SQLite" connectionString="Data Source=d:\Code\GitHub\MES\MES.Framework\Doc\MESFramework.db;Version=3;" />
<!--Oracle数据库的连接字符串-->
<!--<add name="oracle" providerName="Oracle.ManagedDataAccess.Client" connectionString="Data Source=127.0.0.1:1521/XE;User Id=hhmesnew;Password=hhmesnew1;" />-->
<add name="oracle" providerName="Oracle.ManagedDataAccess.Client" connectionString="Data Source=192.168.8.***:1521/hh01;User Id=******;Password=*******;" />
</connectionStrings>
<dataConfiguration defaultDatabase="oracle">
<providerMappings>
<!--SQLServer 不需要设置默认支持-->
<!--SQLite 数据库-->
<add databaseType="EntLibContrib.Data.SQLite.SQLiteDatabase, EntLibContrib.Data.SQLite" name="System.Data.SQLite" />
<!--Oracle 数据库-->
<add databaseType="EntLibContrib.Data.ManagedOdpNet.OracleDatabase, EntLibContrib.Data.ManagedOdpNet" name="Oracle.ManagedDataAccess.Client" />
</providerMappings>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

需要安装两个nuget包 EntLibContrib.Data.ManagedOdpNet和Oracle.ManagedDataAccess

Last Updated: 11/11/2020, 11:10:23 AM