Configuring the connection to *.config file
Configuring the connection to *.config file
Hi all!
How can we do purely connection setting in the configuration file? And then I ORM generates the code is tied to the database, and therefore, if you change your address and server name have to rebuild the project, which is not very desirable.
Thanks in advance.
How can we do purely connection setting in the configuration file? And then I ORM generates the code is tied to the database, and therefore, if you change your address and server name have to rebuild the project, which is not very desirable.
Thanks in advance.
Are you using Entity Developer?killpapa wrote:How can we do purely connection setting in the configuration file?
Create Model Wizard of Entity Developer (which is built-in Visual Studio) includes the "Save connection settings in App.Config" option.
Which ORM are you working with?killpapa wrote:And then I ORM generates the code is tied to the database, and therefore, if you change your address and server name have to rebuild the project, which is not very desirable.
The following information corresponds to Entity Framework.
Here are two solutions to avoid usage of schema prefix before the names of database objects in the queries:
1) turn off the generation of the schema name in run-time queries using the IgnoreSchemaName option of EF-provider configuration: http://www.devart.com/blogs/dotconnect/ ... orkarounds
2) remove Schema attributes from your EntitySets in SSDL (with Entity Developer or with XML Editor).
about this I know:)Shalex wrote: Are you using Entity Developer?
Create Model Wizard of Entity Developer (which is built-in Visual Studio) includes the "Save connection settings in App.Config" option.
I'm using LinqConnectModel.Shalex wrote: Which ORM are you working with?
The following information corresponds to Entity Framework.
Here are two solutions to avoid usage of schema prefix before the names of database objects in the queries:
1) turn off the generation of the schema name in run-time queries using the IgnoreSchemaName option of EF-provider configuration: http://www.devart.com/blogs/dotconnect/ ... orkarounds
2) remove Schema attributes from your EntitySets in SSDL (with Entity Developer or with XML Editor).
In the generated ORM functional database name spelled tough on this when you change the connection string in the configuration file to the database (change the name of the database), we have to rebuild functionality to work. And I would like to be limited only to the configuration file.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
By default, Entity Developer includes the database name into the mapping information. This is done to support the case of working with objects from several databases in the same model.
To disable storing the database name, please re-generate your model with the 'Preserve schema name in storage' option disabled. Please tell us if this helps.
JIC: you can disable this option in existing models as well, though this won't affect the mapping of entity classes that are already present in the model.
To disable storing the database name, please re-generate your model with the 'Preserve schema name in storage' option disabled. Please tell us if this helps.
JIC: you can disable this option in existing models as well, though this won't affect the mapping of entity classes that are already present in the model.