title: How to Use One EF DataContract and 2 WCF Services in the Same Application
body: <p>I'm having a horrible time trying to get this to work.  I have a multiple - identical - WCF services using EF installed on different servers.  Each of them access a different database on different instances of SQL Server.</p>
  
  <p>I'm trying to create a method that will will allow me to connect to Instance1.MyDatabase and Instance2.MyDatabase at the same time.</p>
  
  <p>I can only create 1 endpoint address in the app.config because there is only 1 contract for the EF data.  Here is the endpoint in the app.config</p>
  
  <pre><code>      &lt;endpoint address="http://Server01/DataService/Data.svc"
        binding="basicHttpBinding"
        contract="Query.IPSIData"
        bindingConfiguration="WCFHttpBinding" behaviorConfiguration="WCFHttpBehavior" /&gt;
  </code></pre>
  
  <p>When creating a data context object for the Entity Framework object, I have tried using two different URIs.</p>
  
  <pre><code>Context1 = new DevEntities(service1URI)
  Context2 = new DevEntities(service2URI)
  </code></pre>
  
  <p>What happens is that Context1 returns data and Context2, while creating and querying without error, is not returning any records.  I have tried entering a new endpoint in the config, but it will not compile because both endpoints use the same contract.</p>
  
  <p>Is there a way around this?</p>