Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Entity Framework Perplexities
Message
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Network:
Windows Server 2012
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01646424
Message ID:
01646470
Vues:
29
>
>The connection strings are usually in the config file so just a question of using different configs for the two databases.
>Find the EntityContainerName in Edmx properties and look for that in the configuration/connectionStrings section.
>The actual connection string for the SQL server is contained in the connectionString property (provider connection string)

Can I change config at runtime using the same .exe? Or would it entail 2 different builds? (pardon my ignorance).

Alternatively, I think I know where to find the connections strings now, but I'm not sure how I can "inject" this at run time.

If I'm right EF configures the connections but also the schema's and mappings. What I would like is to use the schema's and mappings of the production db for my test db (I understand that this might be tricky because they need to be identical). Only the server and the user credentials should be different.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform