I'm new to Devart, so I apologize in case of errors or misunderstanding.
I'm developing a "plug-in" (a DLL ) in C# that will be loaded in an internal application.
Since of the architecture, I can't get access to App.config file and connection string should be built within the code.
My last try looks this way:
Code: Select all
private String getEntityConnectionString()
{
OracleConnectionStringBuilder oraCSB = new OracleConnectionStringBuilder();
oraCSB.Direct = true;
oraCSB.Server = "serverAddress";
oraCSB.Port = 1521;
oraCSB.Sid = "SID_DB";
oraCSB.UserId = "USER";
oraCSB.Password = "PASSWORD";
EntityConnectionStringBuilder builder = new EntityConnectionStringBuilder();
builder.ProviderConnectionString = oraCSB.ConnectionString;
builder.Metadata = "C:\\ConfigurationTest\\L2smp.csdl| C:\\ConfigurationTest\\L2smp.ssdl | C:\\ConfigurationTest\\L2smp.msl";
builder.Provider = "Devart.Data.Oracle";
return builder.ConnectionString;
}
Code: Select all
String connectionString = getEntityConnectionString();
EntityConnection connection = null;
try
{
connection = new EntityConnection(
}
catch (Exception e)
{
/* Log and exit */
}
L3Core.Communication.DM.L2smp.L2smpModel context = new L3Core.Communication.DM.L2smp.L2smpModel(connectionString);
Connection is successfully established; then at context creation I get the exception
It's 3 days I'm stuck at this point, googling for a solution or at least some hints, unfortunately.L2smp.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'Devart.Data.Oracle'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
How can I get rid of it?
Cheers