title: how to change connection string entity framework in runtime
body: <p>how to change connection string entity framework in runtime</p>
  
  <p>code in my appconfig file :</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;connectionStrings&gt;
      &lt;add name="RelationAtOfficeEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;Data Source=.;Initial Catalog=RelationAtOffice;Integrated Security=True;MultipleActiveResultSets=True&amp;quot;" providerName="System.Data.EntityClient"/&gt;
    &lt;/connectionStrings&gt;
  &lt;startup&gt;&lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;&lt;/startup&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>I want to change the following code :</p>
  
  <pre><code>    &lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;connectionStrings&gt;
      &lt;add name="RelationAtOfficeEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;Data Source=127.10.10.23,1356;Initial Catalog=RelationAtOffice;Integrated Security=True;MultipleActiveResultSets=True&amp;quot;" providerName="System.Data.EntityClient"/&gt;
    &lt;/connectionStrings&gt;
  &lt;startup&gt;&lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;&lt;/startup&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>just data source changed.</p>
  
  <p>How is it done?</p>