In my configuration files I have a connection string used by a legacy part of the app (using Datasets) and another string for Entity Framework:
<connectionStrings> <add name='Database' connectionString='Server=...' /> <add name='Entities' connectionString='metadata=.....connection string='Server=...' /> </connectionStrings>
This means the server name, database name etc. are specified twice. I’d like to tell the EF connection string to reuse the first string – is this possible?
I think a better approach would be to refactor the application to use just one connection string rather than trying to reference one from the other in your configuration file.