ArcGIS Pro and Configurations

494
1
06-20-2018 02:29 AM
EmilianoPetrelli
New Contributor III
Hi, I'm developing an arcgis pro configuration and I would like to use entity framework 
to access an Oracle database. 
I always get the error "No connection string named 'XXX' could be found in the application 
config file." Is it possible to use entity framework in a "configuration" project? Thanks in advance!

code:
 using (var context = new Entities())
 {
 var user = new APPL_USERS()
 {
 ID_USER = 1,
 NAME = "aaa",
 COUNTRY= "bbb"
 };

 context.APPL_USERS.Add(user);
 context.SaveChanges();
 }

app.config
<oracle.manageddataaccess.client>
 <version number="*">
 <dataSources>
 <dataSource alias="aaa" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxx)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SRV_xxx))) " />
 </dataSources>
 </version>
 </oracle.manageddataaccess.client>
 <connectionStrings>
 <add name="OracleDbContext" providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=oracle_user;Password=oracle_user_password;Data Source=oracle" />
 <add name="Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=&quot;DATA SOURCE=aaa;PASSWORD=xxx;PERSIST SECURITY INFO=True;USER ID=TEST&quot;" providerName="System.Data.EntityClient" />
 </connectionStrings>
0 Kudos
1 Reply
RichRuh
Esri Regular Contributor

Hi Emiliano,

Sorry, we do not have any experience with the entity framework.

-Rich

0 Kudos