Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enitity Framework and COM
Message
De
13/09/2013 11:21:59
 
 
À
13/09/2013 09:32:21
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Versions des environnements
Environment:
C# 5.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web Service
Divers
Thread ID:
01583147
Message ID:
01583167
Vues:
51
>Hi All,
>
>We are migrating an application from VFP to C#. One of the directives for the project is to maintain a common code base whenever possible. As we rewrite into C# we are producing DLLs to be used for data access and as a middle tier. We are looking to migrate portions of the legacy VFP app to using the C# DLLs as well go to only have to maintain a single code set. This can be accomplished by setting up the DLL classes as COM objects and this part works and the classes are available in VFP.
>
>The COM item I am looking to use in a basic data import. When the COM object reaches the point of connecting to the data via the enitity framework I recieve an error that the connection name cannot be found in the app.config file. The import runs just fine in C#, but fails via COM.
>
>Documentation that I have found indicates that DLLs cannot support a config file and that it instead relies on the web.config file of the consuming project. As I am calling the objects via COM there isn't a web.config in the parent project.
>
>Is anyone aware of a better way to do this?

Add an app.config file to the dll project and specify the connection string there.

Or programmatically pass the connection string as a parameter to the entity constructor...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform