I'm having difficulties getting Entity Developer to work with dotConnect for SalesForce.
Is the source code for the DemoCenter available? There's just a single exe in C:\Program Files (x86)\Devart\dotConnect\Salesforce\DemoCenter, and the samples don't seem to cover it.
Source Code to compiled DemoCenter
Re: Source Code to compiled DemoCenter
We do not provide source code of DemoCenter. Could you please tell us why you need it?craigd wrote:Is the source code for the DemoCenter available?
Also specify what functionality should be better described in our samples (\Program Files (x86)\Devart\dotConnect\Salesforce\Samples).
Re: Source Code to compiled DemoCenter
I have tried (am still going) trying to work out how to get Entity Developer to work with dotConnect for SalesForce, and nothing seems to work.
The following code fails when the first account is accessed with an error "keyword not supported: security token", which suggests to me that an SQL provider is being used rather than the SalesForce provider (credentials obfuscated)
SalesforceConnectionStringBuilder builder = new SalesforceConnectionStringBuilder();
builder.UserId = "xxxxxxxxxxxxxxxxxxxxx";
builder.Password = "XXXXXXXXXXXXXX";
builder.SecurityToken = "XXXXXXXXXXXXXXXXXXXX";
builder.Host = "login.salesforce.com";
SFDC.Entities entities = new SFDC.Entities(builder.ConnectionString);
var account = entities.Accounts.First();
I am using 4.3.1 of the EntityFramewor and app.config is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<add name="Entities" providerName="Devart.Data.Salesforce" />
</connectionStrings>
<system.data>
<DbProviderFactories>
<remove invariant="Devart.Data.Salesforce" />
<add name="dotConnect for Salesforce" invariant="Devart.Data.Salesforce" description="Devart dotConnect for Salesforce" type="Devart.Data.Salesforce.SalesforceProviderFactory, Devart.Data.Salesforce, Version=2.2.52.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
<entityFramework>
</entityFramework>
</configuration>
The following code fails when the first account is accessed with an error "keyword not supported: security token", which suggests to me that an SQL provider is being used rather than the SalesForce provider (credentials obfuscated)
SalesforceConnectionStringBuilder builder = new SalesforceConnectionStringBuilder();
builder.UserId = "xxxxxxxxxxxxxxxxxxxxx";
builder.Password = "XXXXXXXXXXXXXX";
builder.SecurityToken = "XXXXXXXXXXXXXXXXXXXX";
builder.Host = "login.salesforce.com";
SFDC.Entities entities = new SFDC.Entities(builder.ConnectionString);
var account = entities.Accounts.First();
I am using 4.3.1 of the EntityFramewor and app.config is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<add name="Entities" providerName="Devart.Data.Salesforce" />
</connectionStrings>
<system.data>
<DbProviderFactories>
<remove invariant="Devart.Data.Salesforce" />
<add name="dotConnect for Salesforce" invariant="Devart.Data.Salesforce" description="Devart dotConnect for Salesforce" type="Devart.Data.Salesforce.SalesforceProviderFactory, Devart.Data.Salesforce, Version=2.2.52.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
<entityFramework>
</entityFramework>
</configuration>
Re: Source Code to compiled DemoCenter
Please try using the connection string in the following format:
Code: Select all
string myConnectionString = @"metadata=res://*/DataModel.csdl|res://*/DataModel.ssdl|res://*/DataModel.msl;provider=Devart.Data.Salesforce;provider connection string=""User Id=XXXXXX;Security Token=XXXXXX;Password=XXXXXX;Host=login.salesforce.com;""";
SFDC.Entities entities = new SFDC.Entities(myConnectionString);
var account = entities.Accounts.First();