I am setting up the unity configurations in the web.config and I have a type which I want to pass to it the connection string which already exist in the same web.config file.
<connectionStrings>
<add name="DatabaseConnectionString" connectionString="metadata=res://*/Database.csdl|res://*/Database.ssdl|....." providerName="System.Data.EntityClient" />
</connectionStrings>
and in the unity section there is:
<type type="IDatabase" mapTo="Database" >
<constructor>
<param name="connectionString" >
<value value="metadata=res://*/Database.csdl|res://*/Database.ssdl|...."/>
</param>
</constructor>
</type>
But like that I am writing the same conectionString twice in the same .config file, Is there another better way to pass just the name of the connectionString to the type Database constructor to avoid duplicates in the web.config?