Because our web application is using both Entityframework and System.Data.SqlClient, we need to have 2 . This is very error prone, as you need to make you update both with the same data.
So i wonder if its posible to add variables to the web.config xml?
<connectionStrings>
<add name="Server" value="sql2014" type="variable" />
<add name="database" value="MyDB" type="variable" />
<add name="userName" value="sqluser" type="variable" />
<add name="password" value="kaldsommer" type="variable" />
<add name="XReport" connectionString="Data Source={Server};Initial Catalog={MyDB};User ID={username};Password={password}" providerName="System.Data.SqlClient" />
<add name="XEntities" connectionString="metadata=res://*/Entities.XModel.csdl|res://*/Entities.XModel.ssdl|res://*/Entities.XModel.msl;provider=System.Data.SqlClient;provider connection string="data source{Server};initial catalog={MyDB};MultipleActiveResultSets=True;App=EntityFramework;;Persist Security Info=True;User ID={username};Password={password}"" providerName="System.Data.EntityClient" />
</connectionStrings>
Pr @Bartude reply in comment.