by kevin
  
    8.   
      十月 2015 14:42
  >
  
  
  
FlentData3.0.1 好像不支持,或者是我没找到使用的方法,3.0.1支持。
  代码:
  new DbContext().ConnectionStringName(@"default", new OracleProvider());
Web.Config配置
  <add name="default" connectionString="data source=localhost/orali;persist security info=True;user id=System;password=System;" providerName="Oracle.ManagedDataAccess.Client" />
 
或者
<add name="default" connectionString="data source=localhost/oral;persist security info=True;user id=system;password=system;" providerName="System.Data.OracleClient" />
主要是连接字符串的providerName必填,根据自己安装的客户端填写。