这是自动生成的App.config:
<?xml version="1.0" encoding="utf-8"?> <configuration> <connectionStrings> <add name="EarthEntities" connectionString="metadata=res://*/EarthMoldels.csdl|res://*/EarthMoldels.ssdl|res://*/EarthMoldels.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string="data source=10.3.30.7:1521/ORCL;password=user10;persist security info=True;user id=IMS"" providerName="System.Data.EntityClient" /> </connectionStrings> </configuration>
(已经装了合适的ODAC,在其它电脑中能运行!)
通过VS的服务器资源管理器都能查到数据的,为啥在调用的时候就报错!!!
EarthEntities earlyContext = new EarthEntities(); var data = earlyContext.CORE_FLOW_PROCESSRECORD.Take(2).ToList();//报错!!!!!!!
provider=Oracle.ManagedDataAccess.Client =》 provider=Oracle.DataAccess.Client;
@JeffchyWang 多谢,才看到你的回复,我用其它方法解决的,我先把这个NUGET包安装了,再添加ef类就可以连接。